bmcweb: fix compiler warnings

This patchset attempts to fix all compiler warnings in bmcweb owned
files.  There are 2 warnings left, both in sdbusplus, which will be
resolved in a patchset there.

Tested By:
Recompiled, observed warning count went from 30, to zero.

Change-Id: Ife90207aa5773bc28faa8b04c732cafa5a56e4e4
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index aecfc21..a7018a4 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -632,8 +632,7 @@
                        const std::string &address,
                        std::shared_ptr<AsyncResp> asyncResp)
 {
-    auto createIpHandler = [ipIdx,
-                            asyncResp](const boost::system::error_code ec) {
+    auto createIpHandler = [asyncResp](const boost::system::error_code ec) {
         if (ec)
         {
             messages::internalError(asyncResp->res);
@@ -1634,8 +1633,7 @@
         // Get eth interface list, and call the below callback for JSON
         // preparation
         getEthernetIfaceList(
-            [this, asyncResp,
-             rootInterfaceName{std::string(rootInterfaceName)}](
+            [asyncResp, rootInterfaceName{std::string(rootInterfaceName)}](
                 const bool &success,
                 const std::vector<std::string> &iface_list) {
                 if (!success)