[clang-tidy] Fix clang-tidy errors and format code Fix the following readability-* errors: readability-avoid-const-params-in-decls readability-redundant-string-init More details in b/375055000 Also run openbmc_build_scripts/scripts/format_code.sh to pass presubmit. Change-Id: Ia5ee9ba75025ed259ed99d624c0e5ccb9aca7058 Signed-off-by: David Tang <davtang@google.com>
diff --git a/boot-time-blob/blob_handler.hpp b/boot-time-blob/blob_handler.hpp index bce4bb2..3f032da 100644 --- a/boot-time-blob/blob_handler.hpp +++ b/boot-time-blob/blob_handler.hpp
@@ -34,7 +34,7 @@ bool expire(uint16_t session) override; private: - bool isReadOnlyOpenFlags(const uint16_t flag); + bool isReadOnlyOpenFlags(uint16_t flag); std::unordered_map<uint16_t, std::vector<char>> sessions; };
diff --git a/test/utils_test.cpp b/test/utils_test.cpp index a43bf12..9326069 100644 --- a/test/utils_test.cpp +++ b/test/utils_test.cpp
@@ -126,7 +126,7 @@ EXPECT_EQ((*vec)[1].monoTime, 50); // Check file content - std::string input = ""; + std::string input; std::ifstream ifs(cpCompleted); ASSERT_TRUE(ifs.good()); ifs >> input; @@ -175,7 +175,7 @@ EXPECT_EQ((*vec)[1].duration, 3000); // Check file content - std::string input = ""; + std::string input; std::ifstream ifs(durCompleted); ASSERT_TRUE(ifs.good()); ifs >> input;