Change variable scopes

cppcheck correctly notes that a lot of our variables can be declared at
more specific scopes, and in every case, it seems to be correct.

Tested: Redfish service validator passes.  Unit test coverage on others.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ia4414410d0e8f74a3bd40fdc0e0232450d1a6416
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index b6c500e..d9c26f3 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -1294,9 +1294,9 @@
             return;
         }
 
-        std::string appliedConfigUri;
         if (appliedConfigJson)
         {
+            std::string appliedConfigUri;
             if (!json_util::readJson(*appliedConfigJson, asyncResp->res,
                                      "@odata.id", appliedConfigUri))
             {