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/routing.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/routing.hpp')
-rw-r--r-- | http/routing.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/http/routing.hpp b/http/routing.hpp index c8946e4173..06f2a091ba 100644 --- a/http/routing.hpp +++ b/http/routing.hpp @@ -805,7 +805,7 @@ class Trie char c = reqUrl[pos]; if ((c >= '0' && c <= '9') || c == '+' || c == '-') { - char* eptr; + char* eptr = nullptr; errno = 0; long long int value = std::strtoll(reqUrl.data() + pos, &eptr, 10); @@ -828,7 +828,7 @@ class Trie char c = reqUrl[pos]; if ((c >= '0' && c <= '9') || c == '+') { - char* eptr; + char* eptr = nullptr; errno = 0; unsigned long long int value = std::strtoull(reqUrl.data() + pos, &eptr, 10); @@ -851,7 +851,7 @@ class Trie char c = reqUrl[pos]; if ((c >= '0' && c <= '9') || c == '+' || c == '-' || c == '.') { - char* eptr; + char* eptr = nullptr; errno = 0; double value = std::strtod(reqUrl.data() + pos, &eptr); if (errno != ERANGE && eptr != reqUrl.data() + pos) |