Enable unused variable warnings and resolve

This commit enables the "unused variables" warning in clang.  Throughout
this, it did point out several issues that would've been functional
bugs, so I think it was worthwhile.  It also cleaned up several unused
variable from old constructs that no longer exist.

Tested:
Built with clang.  Code no longer emits warnings.

Downloaded bmcweb to system and pulled up the webui, observed webui
loads and logs in properly.

Change-Id: I51505f4222cc147d6f2b87b14d7e2ac4a74cafa8
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index a113ba1..56abdcf 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -87,7 +87,7 @@
      * OpenBMC only supports ResetType "GracefulRestart".
      */
     void doPost(crow::Response& res, const crow::Request& req,
-                const std::vector<std::string>& params) override
+                const std::vector<std::string>&) override
     {
         BMCWEB_LOG_DEBUG << "Post Manager Reset.";
 
@@ -139,7 +139,7 @@
      * OpenBMC only supports ResetToDefaultsType "ResetAll".
      */
     void doPost(crow::Response& res, const crow::Request& req,
-                const std::vector<std::string>& params) override
+                const std::vector<std::string>&) override
     {
         BMCWEB_LOG_DEBUG << "Post ResetToDefaults.";
 
@@ -210,8 +210,8 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request& req,
-               const std::vector<std::string>& params) override
+    void doGet(crow::Response& res, const crow::Request&,
+               const std::vector<std::string>&) override
     {
         res.jsonValue = {
             {"@odata.type", "#ActionInfo.v1_1_2.ActionInfo"},
@@ -1372,11 +1372,11 @@
                 const std::string& owner = subtree[0].second[0].first;
                 crow::connections::systemBus->async_method_call(
                     [self, path, owner](
-                        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>>& r) {
-                        if (ec)
+                        if (ec2)
                         {
                             BMCWEB_LOG_ERROR << "SetPIDValues: Can't get "
                                                 "thermalModeIface "
@@ -1673,8 +1673,8 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request& req,
-               const std::vector<std::string>& params) override
+    void doGet(crow::Response& res, const crow::Request&,
+               const std::vector<std::string>&) override
     {
         res.jsonValue["@odata.id"] = "/redfish/v1/Managers/bmc";
         res.jsonValue["@odata.type"] = "#Manager.v1_9_0.Manager";
@@ -1806,7 +1806,7 @@
     }
 
     void doPatch(crow::Response& res, const crow::Request& req,
-                 const std::vector<std::string>& params) override
+                 const std::vector<std::string>&) override
     {
         std::optional<nlohmann::json> oem;
         std::optional<nlohmann::json> links;
@@ -2088,8 +2088,8 @@
     }
 
   private:
-    void doGet(crow::Response& res, const crow::Request& req,
-               const std::vector<std::string>& params) override
+    void doGet(crow::Response& res, const crow::Request&,
+               const std::vector<std::string>&) override
     {
         // Collections don't include the static data added by SubRoute
         // because it has a duplicate entry for members