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 /include/ibm | |
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 'include/ibm')
-rw-r--r-- | include/ibm/locks.hpp | 4 | ||||
-rw-r--r-- | include/ibm/management_console_rest.hpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/ibm/locks.hpp b/include/ibm/locks.hpp index 800ee484e8..fb8b396821 100644 --- a/include/ibm/locks.hpp +++ b/include/ibm/locks.hpp @@ -39,7 +39,7 @@ using ListOfSessionIds = std::vector<std::string>; class Lock { - uint32_t transactionId; + uint32_t transactionId = 0; boost::container::flat_map<uint32_t, LockRequests> lockTable; protected: @@ -429,7 +429,7 @@ inline bool Lock::isValidLockRequest(const LockRequest& refLockRecord) inline Rc Lock::isConflictWithTable(const LockRequests& refLockRequestStructure) { - uint32_t transactionId; + uint32_t transactionId = 0; if (lockTable.empty()) { diff --git a/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp index 59d4111a77..57c9d8328f 100644 --- a/include/ibm/management_console_rest.hpp +++ b/include/ibm/management_console_rest.hpp @@ -418,7 +418,7 @@ inline void for (auto& element : body) { std::string lockType; - uint64_t resourceId; + uint64_t resourceId = 0; SegmentFlags segInfo; std::vector<nlohmann::json> segmentFlags; @@ -439,7 +439,7 @@ inline void for (auto& e : segmentFlags) { std::string lockFlags; - uint32_t segmentLength; + uint32_t segmentLength = 0; if (!redfish::json_util::readJson(e, asyncResp->res, "LockFlag", lockFlags, "SegmentLength", |