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/managers.hpp b/redfish-core/lib/managers.hpp
index 552c264..a113ba1 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -38,7 +38,7 @@
  *
  * @param[in] asyncResp - Shared pointer for completing asynchronous calls
  */
-void doBMCGracefulRestart(std::shared_ptr<AsyncResp> asyncResp)
+inline void doBMCGracefulRestart(std::shared_ptr<AsyncResp> asyncResp)
 {
     const char* processName = "xyz.openbmc_project.State.BMC";
     const char* objectPath = "/xyz/openbmc_project/state/bmc0";
@@ -238,7 +238,7 @@
 static constexpr const char* thermalModeIface =
     "xyz.openbmc_project.Control.ThermalMode";
 
-static void asyncPopulatePid(const std::string& connection,
+inline void asyncPopulatePid(const std::string& connection,
                              const std::string& path,
                              const std::string& currentProfile,
                              const std::vector<std::string>& supportedProfiles,
@@ -655,7 +655,7 @@
     patch
 };
 
-static bool getZonesFromJsonReq(const std::shared_ptr<AsyncResp>& response,
+inline bool getZonesFromJsonReq(const std::shared_ptr<AsyncResp>& response,
                                 std::vector<nlohmann::json>& config,
                                 std::vector<std::string>& zones)
 {
@@ -693,7 +693,7 @@
     return true;
 }
 
-static const dbus::utility::ManagedItem*
+inline const dbus::utility::ManagedItem*
     findChassis(const dbus::utility::ManagedObjectType& managedObj,
                 const std::string& value, std::string& chassis)
 {
@@ -725,7 +725,7 @@
     return nullptr;
 }
 
-static CreatePIDRet createPidInterface(
+inline CreatePIDRet createPidInterface(
     const std::shared_ptr<AsyncResp>& response, const std::string& type,
     nlohmann::json::iterator it, const std::string& path,
     const dbus::utility::ManagedObjectType& managedObj, bool createNewObject,
@@ -1052,10 +1052,10 @@
             for (auto& step : *steps)
             {
                 double target;
-                double output;
+                double out;
 
                 if (!redfish::json_util::readJson(step, response->res, "Target",
-                                                  target, "Output", output))
+                                                  target, "Output", out))
                 {
                     BMCWEB_LOG_ERROR << "Line:" << __LINE__
                                      << ", Illegal Property "
@@ -1063,7 +1063,7 @@
                     return CreatePIDRet::fail;
                 }
                 readings.emplace_back(target);
-                outputs.emplace_back(output);
+                outputs.emplace_back(out);
             }
             output["Reading"] = std::move(readings);
             output["Output"] = std::move(outputs);
@@ -1109,8 +1109,8 @@
 struct GetPIDValues : std::enable_shared_from_this<GetPIDValues>
 {
 
-    GetPIDValues(const std::shared_ptr<AsyncResp>& asyncResp) :
-        asyncResp(asyncResp)
+    GetPIDValues(const std::shared_ptr<AsyncResp>& asyncRespIn) :
+        asyncResp(asyncRespIn)
 
     {}
 
@@ -1121,14 +1121,14 @@
         // get all configurations
         crow::connections::systemBus->async_method_call(
             [self](const boost::system::error_code ec,
-                   const crow::openbmc_mapper::GetSubTreeType& subtree) {
+                   const crow::openbmc_mapper::GetSubTreeType& subtreeLocal) {
                 if (ec)
                 {
                     BMCWEB_LOG_ERROR << ec;
                     messages::internalError(self->asyncResp->res);
                     return;
                 }
-                self->subtree = subtree;
+                self->subtree = subtreeLocal;
             },
             "xyz.openbmc_project.ObjectMapper",
             "/xyz/openbmc_project/object_mapper",
@@ -1140,12 +1140,12 @@
         // at the same time get the selected profile
         crow::connections::systemBus->async_method_call(
             [self](const boost::system::error_code ec,
-                   const crow::openbmc_mapper::GetSubTreeType& subtree) {
-                if (ec || subtree.empty())
+                   const crow::openbmc_mapper::GetSubTreeType& subtreeLocal) {
+                if (ec || subtreeLocal.empty())
                 {
                     return;
                 }
-                if (subtree[0].second.size() != 1)
+                if (subtreeLocal[0].second.size() != 1)
                 {
                     // invalid mapper response, should never happen
                     BMCWEB_LOG_ERROR << "GetPIDValues: Mapper Error";
@@ -1153,15 +1153,15 @@
                     return;
                 }
 
-                const std::string& path = subtree[0].first;
-                const std::string& owner = subtree[0].second[0].first;
+                const std::string& path = subtreeLocal[0].first;
+                const std::string& owner = subtreeLocal[0].second[0].first;
                 crow::connections::systemBus->async_method_call(
                     [path, owner, self](
-                        const boost::system::error_code ec,
+                        const boost::system::error_code ec2,
                         const boost::container::flat_map<
                             std::string, std::variant<std::vector<std::string>,
                                                       std::string>>& resp) {
-                        if (ec)
+                        if (ec2)
                         {
                             BMCWEB_LOG_ERROR << "GetPIDValues: Can't get "
                                                 "thermalModeIface "