Enable clang warnings

This commit enables clang warnings, and fixes all warnings that were
found.  Most of these fall into a couple categories:

Variable shadow issues were fixed by renaming variables

unused parameter warnings were resolved by either checking error codes
that had been ignored, or removing the name of the variable from the
scope.

Other various warnings were fixed in the best way I was able to come up
with.

Note, the redfish Node class is especially insidious, as it causes all
imlementers to have variables for parameters, regardless of whether or
not they are used.  Deprecating the Node class is on my list of things
to do, as it adds extra overhead, and in general isn't a useful
abstraction.  For now, I have simply fixed all the handlers.

Tested:
Added the current meta-clang meta layer into bblayers.conf, and added
TOOLCHAIN_pn-bmcweb = "clang" to my local.conf

Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: Ia75b94010359170159c703e535d1c1af182fe700
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
index 26cd80a..fa06fcf 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -233,7 +233,7 @@
         std::string protocol;
         std::optional<std::string> context;
         std::optional<std::string> subscriptionType;
-        std::optional<std::string> eventFormatType;
+        std::optional<std::string> eventFormatType2;
         std::optional<std::string> retryPolicy;
         std::optional<std::vector<std::string>> msgIds;
         std::optional<std::vector<std::string>> regPrefixes;
@@ -244,7 +244,7 @@
         if (!json_util::readJson(
                 req, res, "Destination", destUrl, "Context", context,
                 "Protocol", protocol, "SubscriptionType", subscriptionType,
-                "EventFormatType", eventFormatType, "HttpHeaders", headers,
+                "EventFormatType", eventFormatType2, "HttpHeaders", headers,
                 "RegistryPrefixes", regPrefixes, "MessageIds", msgIds,
                 "DeliveryRetryPolicy", retryPolicy, "MetricReportDefinitions",
                 mrdJsonArray, "ResourceTypes", resTypes))
@@ -328,22 +328,22 @@
         }
         subValue->protocol = protocol;
 
-        if (eventFormatType)
+        if (eventFormatType2)
         {
             if (std::find(supportedEvtFormatTypes.begin(),
                           supportedEvtFormatTypes.end(),
-                          *eventFormatType) == supportedEvtFormatTypes.end())
+                          *eventFormatType2) == supportedEvtFormatTypes.end())
             {
                 messages::propertyValueNotInList(
-                    asyncResp->res, *eventFormatType, "EventFormatType");
+                    asyncResp->res, *eventFormatType2, "EventFormatType");
                 return;
             }
-            subValue->eventFormatType = *eventFormatType;
+            subValue->eventFormatType = *eventFormatType2;
         }
         else
         {
             // If not specified, use default "Event"
-            subValue->eventFormatType.assign({"Event"});
+            subValue->eventFormatType = "Event";
         }
 
         if (context)
@@ -522,7 +522,7 @@
             else
             {
                 // If nothing specified, using default "Event"
-                subValue->eventFormatType.assign({"Event"});
+                subValue->eventFormatType = "Event";
             }
 
             if (!subValue->registryPrefixes.empty())