Fix shadowed variable issues

This patchset is the conclusion of a multi-year effort to try to fix
shadowed variable names.  Variables seem to be shadowed all over, and in
most places they exist, there's a "code smell" of things that aren't
doing what the author intended.

This commit attempts to clean up these in several ways by:
1. Renaming variables where appropriate.
2. Preferring to refer to member variables directly when operating
   within a class
3. Rearranging code so that pass through variables are handled in the
   calling scope, rather than passing them through.

These patterns are applied throughout the codebase, to the point where
-Wshadow can be enabled in meson.build.

Tested: Code compiles, unit tests pass.  Still need to run redfish
service validator.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: If703398c2282f9e096ca2694fd94515de36a098b
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index 1e04393..a8cfb68 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -581,13 +581,13 @@
                     "xyz.openbmc_project.Inventory.Item.Cpu."
                     "OperatingConfig",
                     "BaseSpeedPrioritySettings",
-                    [aResp](const boost::system::error_code ec,
+                    [aResp](const boost::system::error_code ec2,
                             const BaseSpeedPrioritySettingsProperty&
                                 baseSpeedList) {
-                    if (ec)
+                    if (ec2)
                     {
                         BMCWEB_LOG_WARNING << "D-Bus Property Get error: "
-                                           << ec;
+                                           << ec2;
                         messages::internalError(aResp->res);
                         return;
                     }
@@ -731,7 +731,7 @@
             // matching objects. Assume all interfaces we want to process
             // must be on the same object path.
 
-            handler(resp, processorId, objectPath, serviceMap);
+            handler(objectPath, serviceMap);
             return;
         }
         messages::resourceNotFound(resp->res, "Processor", processorId);
@@ -1218,7 +1218,9 @@
         asyncResp->res.jsonValue["@odata.id"] =
             "/redfish/v1/Systems/system/Processors/" + processorId;
 
-        getProcessorObject(asyncResp, processorId, getProcessorData);
+        getProcessorObject(
+            asyncResp, processorId,
+            std::bind_front(getProcessorData, asyncResp, processorId));
         });
 
     BMCWEB_ROUTE(app, "/redfish/v1/Systems/system/Processors/<str>/")
@@ -1249,17 +1251,10 @@
             }
             // Check for 404 and find matching D-Bus object, then run
             // property patch handlers if that all succeeds.
-            getProcessorObject(
-                asyncResp, processorId,
-                [appliedConfigUri = std::move(appliedConfigUri)](
-                    const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
-                    const std::string& processorId,
-                    const std::string& objectPath,
-                    const dbus::utility::MapperServiceMap& serviceMap) {
-                patchAppliedOperatingConfig(asyncResp, processorId,
-                                            appliedConfigUri, objectPath,
-                                            serviceMap);
-                });
+            getProcessorObject(asyncResp, processorId,
+                               std::bind_front(patchAppliedOperatingConfig,
+                                               asyncResp, processorId,
+                                               appliedConfigUri));
         }
         });
 }