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/http/routing.h b/http/routing.h
index 2f90c07..1af1b2b 100644
--- a/http/routing.h
+++ b/http/routing.h
@@ -219,7 +219,7 @@
     template <typename Req, typename... Args>
     struct ReqHandlerWrapper
     {
-        ReqHandlerWrapper(Func f) : f(std::move(f))
+        ReqHandlerWrapper(Func fIn) : f(std::move(fIn))
         {}
 
         void operator()(const Request& req, Response& res, Args... args)
@@ -315,7 +315,7 @@
     using self_t = WebSocketRule;
 
   public:
-    WebSocketRule(std::string rule) : BaseRule(std::move(rule))
+    WebSocketRule(std::string ruleIn) : BaseRule(std::move(ruleIn))
     {}
 
     void validate() override
@@ -428,7 +428,7 @@
     }
 
     template <typename... MethodArgs>
-    self_t& requires(std::initializer_list<const char*> l)
+    self_t& privileges(std::initializer_list<const char*> l)
     {
         self_t* self = static_cast<self_t*>(this);
         self->privilegesSet.emplace_back(l);
@@ -436,7 +436,7 @@
     }
 
     template <typename... MethodArgs>
-    self_t& requires(const std::vector<redfish::Privileges>& p)
+    self_t& privileges(const std::vector<redfish::Privileges>& p)
     {
         self_t* self = static_cast<self_t*>(this);
         for (const redfish::Privileges& privilege : p)
@@ -450,7 +450,7 @@
 class DynamicRule : public BaseRule, public RuleParameterTraits<DynamicRule>
 {
   public:
-    DynamicRule(std::string rule) : BaseRule(std::move(rule))
+    DynamicRule(std::string ruleIn) : BaseRule(std::move(ruleIn))
     {}
 
     void validate() override
@@ -982,7 +982,7 @@
                     case ParamType::PATH:
                         BMCWEB_LOG_DEBUG << "<path>";
                         break;
-                    default:
+                    case ParamType::MAX:
                         BMCWEB_LOG_DEBUG << "<ERROR>";
                         break;
                 }
@@ -1203,9 +1203,9 @@
             // Check to see if this url exists at any verb
             for (const PerMethod& p : perMethods)
             {
-                const std::pair<unsigned, RoutingParams>& found =
+                const std::pair<unsigned, RoutingParams>& found2 =
                     p.trie.find(req.url);
-                if (found.first > 0)
+                if (found2.first > 0)
                 {
                     res.result(boost::beast::http::status::method_not_allowed);
                     res.end();
@@ -1340,7 +1340,7 @@
                     }
                 }
 
-                // Get the user privileges from the role
+                // Get the userprivileges from the role
                 redfish::Privileges userPrivileges =
                     redfish::getUserPrivileges(userRole);
 
@@ -1349,10 +1349,10 @@
                 // value from any previous use of this session.
                 req.session->isConfigureSelfOnly = passwordExpired;
 
-                // Modify privileges if isConfigureSelfOnly.
+                // Modifyprivileges if isConfigureSelfOnly.
                 if (req.session->isConfigureSelfOnly)
                 {
-                    // Remove all privileges except ConfigureSelf
+                    // Remove allprivileges except ConfigureSelf
                     userPrivileges = userPrivileges.intersection(
                         redfish::Privileges{"ConfigureSelf"});
                     BMCWEB_LOG_DEBUG << "Operation limited to ConfigureSelf";
@@ -1384,8 +1384,8 @@
     {
         for (size_t i = 0; i < perMethods.size(); i++)
         {
-            BMCWEB_LOG_DEBUG
-                << methodName(static_cast<boost::beast::http::verb>(i));
+            BMCWEB_LOG_DEBUG << boost::beast::http::to_string(
+                static_cast<boost::beast::http::verb>(i));
             perMethods[i].trie.debugPrint();
         }
     }