diff options
author | Ed Tanous <edtanous@google.com> | 2022-01-07 00:12:53 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-01-12 22:00:37 +0300 |
commit | 543f44000a992870ff76e76888dd589a3a31ed4e (patch) | |
tree | 9e4363d871da1643f25856665585bb8c6e251aa3 /http/utility.hpp | |
parent | d63c72ea488b808f5574e61585334a3ffb90c258 (diff) | |
download | bmcweb-543f44000a992870ff76e76888dd589a3a31ed4e.tar.xz |
Enable init checker
clang-tidy added cppcoreguidelines-init-variables as a check, which is
something we already enforce to some extent, but getting CI to enforce
it will help reviews move faster.
Tested: Code compiles. Noop changes.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I7e10950de617b1d3262265572b1703f2e60b69d0
Diffstat (limited to 'http/utility.hpp')
-rw-r--r-- | http/utility.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/http/utility.hpp b/http/utility.hpp index 374caeafdd..74a35daed3 100644 --- a/http/utility.hpp +++ b/http/utility.hpp @@ -425,7 +425,7 @@ inline std::string base64encode(const std::string_view data) size_t i = 0; while (i < size) { - size_t keyIndex; + size_t keyIndex = 0; keyIndex = static_cast<size_t>(data[i] & 0xFC) >> 2; *it++ = key[keyIndex]; @@ -513,10 +513,10 @@ inline bool base64Decode(const std::string_view input, std::string& output) for (size_t i = 0; i < inputLength; i++) { - char base64code0; - char base64code1; + char base64code0 = 0; + char base64code1 = 0; char base64code2 = 0; // initialized to 0 to suppress warnings - char base64code3; + char base64code3 = 0; base64code0 = getCodeValue(input[i]); if (base64code0 == nop) |