diff options
author | Ed Tanous <edtanous@google.com> | 2022-07-01 01:55:45 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-12-21 20:15:07 +0300 |
commit | f8fe53e7114ab10c9059377541277739ace5c1ff (patch) | |
tree | 368784d5e265e876e05523493cf058c5d24c8240 /http/utility.hpp | |
parent | 6dcbb8675d5c5765c3e53354b8f3b339effecd44 (diff) | |
download | bmcweb-f8fe53e7114ab10c9059377541277739ace5c1ff.tar.xz |
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
Diffstat (limited to 'http/utility.hpp')
-rw-r--r-- | http/utility.hpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/http/utility.hpp b/http/utility.hpp index 4f5cea74fd..f49aa9b859 100644 --- a/http/utility.hpp +++ b/http/utility.hpp @@ -485,7 +485,6 @@ inline bool base64Decode(const std::string_view input, std::string& output) 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 @@ inline bool base64Decode(const std::string_view input, std::string& output) { // 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; |