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/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index 852b3b7..babfd4a 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -731,9 +731,8 @@
  *
  * @return None
  */
-inline void createIPv4(const std::string& ifaceId, unsigned int ipIdx,
-                       uint8_t prefixLength, const std::string& gateway,
-                       const std::string& address,
+inline void createIPv4(const std::string& ifaceId, uint8_t prefixLength,
+                       const std::string& gateway, const std::string& address,
                        std::shared_ptr<AsyncResp> asyncResp)
 {
     crow::connections::systemBus->async_method_call(
@@ -1019,8 +1018,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"] =
             "#EthernetInterfaceCollection.EthernetInterfaceCollection";
@@ -1551,8 +1550,8 @@
                 }
                 else
                 {
-                    createIPv4(ifaceId, entryIdx, prefixLength, *gateway,
-                               *address, asyncResp);
+                    createIPv4(ifaceId, prefixLength, *gateway, *address,
+                               asyncResp);
                 }
                 entryIdx++;
             }
@@ -1868,7 +1867,7 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request& req,
+    void doGet(crow::Response& res, const crow::Request&,
                const std::vector<std::string>& params) override
     {
         std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
@@ -2079,11 +2078,10 @@
     }
 
   private:
-    void parseInterfaceData(
-        nlohmann::json& json_response, const std::string& parent_iface_id,
-        const std::string& iface_id, const EthernetInterfaceData& ethData,
-        const boost::container::flat_set<IPv4AddressData>& ipv4Data,
-        const boost::container::flat_set<IPv6AddressData>& ipv6Data)
+    void parseInterfaceData(nlohmann::json& json_response,
+                            const std::string& parent_iface_id,
+                            const std::string& iface_id,
+                            const EthernetInterfaceData& ethData)
     {
         // Fill out obvious data...
         json_response["Id"] = iface_id;
@@ -2113,7 +2111,7 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request& req,
+    void doGet(crow::Response& res, const crow::Request&,
                const std::vector<std::string>& params) override
     {
         std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
@@ -2146,13 +2144,12 @@
             [this, asyncResp, parent_iface_id{std::string(params[0])},
              iface_id{std::string(params[1])}](
                 const bool& success, const EthernetInterfaceData& ethData,
-                const boost::container::flat_set<IPv4AddressData>& ipv4Data,
-                const boost::container::flat_set<IPv6AddressData>& ipv6Data) {
+                const boost::container::flat_set<IPv4AddressData>&,
+                const boost::container::flat_set<IPv6AddressData>&) {
                 if (success && ethData.vlan_id.size() != 0)
                 {
                     parseInterfaceData(asyncResp->res.jsonValue,
-                                       parent_iface_id, iface_id, ethData,
-                                       ipv4Data, ipv6Data);
+                                       parent_iface_id, iface_id, ethData);
                 }
                 else
                 {
@@ -2199,10 +2196,10 @@
         getEthernetIfaceData(
             params[1],
             [asyncResp, parentIfaceId{std::string(params[0])},
-             ifaceId{std::string(params[1])}, &vlanEnable, &vlanId](
-                const bool& success, const EthernetInterfaceData& ethData,
-                const boost::container::flat_set<IPv4AddressData>& ipv4Data,
-                const boost::container::flat_set<IPv6AddressData>& ipv6Data) {
+             ifaceId{std::string(params[1])}, &vlanEnable,
+             &vlanId](const bool& success, const EthernetInterfaceData& ethData,
+                      const boost::container::flat_set<IPv4AddressData>&,
+                      const boost::container::flat_set<IPv6AddressData>&) {
                 if (success && !ethData.vlan_id.empty())
                 {
                     auto callback =
@@ -2244,7 +2241,7 @@
             });
     }
 
-    void doDelete(crow::Response& res, const crow::Request& req,
+    void doDelete(crow::Response& res, const crow::Request&,
                   const std::vector<std::string>& params) override
     {
         std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);
@@ -2271,8 +2268,8 @@
             [asyncResp, parentIfaceId{std::string(params[0])},
              ifaceId{std::string(params[1])}](
                 const bool& success, const EthernetInterfaceData& ethData,
-                const boost::container::flat_set<IPv4AddressData>& ipv4Data,
-                const boost::container::flat_set<IPv6AddressData>& ipv6Data) {
+                const boost::container::flat_set<IPv4AddressData>&,
+                const boost::container::flat_set<IPv6AddressData>&) {
                 if (success && !ethData.vlan_id.empty())
                 {
                     auto callback =
@@ -2323,7 +2320,7 @@
     /**
      * Functions triggers appropriate requests on DBus
      */
-    void doGet(crow::Response& res, const crow::Request& req,
+    void doGet(crow::Response& res, const crow::Request&,
                const std::vector<std::string>& params) override
     {
         std::shared_ptr<AsyncResp> asyncResp = std::make_shared<AsyncResp>(res);