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/http/http_response.hpp b/http/http_response.hpp
index c1f25a5..b1b15fb 100644
--- a/http/http_response.hpp
+++ b/http/http_response.hpp
@@ -41,9 +41,9 @@
     {}
 
     Response(Response&& res) noexcept :
-        stringResponse(std::move(res.stringResponse)), completed(res.completed)
+        stringResponse(std::move(res.stringResponse)),
+        jsonValue(std::move(res.jsonValue)), completed(res.completed)
     {
-        jsonValue = std::move(res.jsonValue);
         // See note in operator= move handler for why this is needed.
         if (!res.completed)
         {
diff --git a/http/utility.hpp b/http/utility.hpp
index 4f5cea7..f49aa9b 100644
--- a/http/utility.hpp
+++ b/http/utility.hpp
@@ -485,7 +485,6 @@
         char base64code0 = 0;
         char base64code1 = 0;
         char base64code2 = 0; // initialized to 0 to suppress warnings
-        char base64code3 = 0;
 
         base64code0 = getCodeValue(input[i]);
         if (base64code0 == nop)
@@ -528,7 +527,7 @@
             { // padding , end of input
                 return (base64code2 & 0x03) == 0;
             }
-            base64code3 = getCodeValue(input[i]);
+            char base64code3 = getCodeValue(input[i]);
             if (base64code3 == nop)
             { // non base64 character
                 return false;