summaryrefslogtreecommitdiff
path: root/redfish-core/lib
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2022-09-09 01:35:35 +0300
committerEd Tanous <ed@tanous.net>2022-09-09 17:33:09 +0300
commit62bafc01bf4f4e2017d4a9e8d6d053f24ca30563 (patch)
tree4f9760fba8d6978f35fd844fb4654f8d906733b0 /redfish-core/lib
parent2e30bc2dfc54ea81f4b5e537b233f8ab50967109 (diff)
downloadbmcweb-62bafc01bf4f4e2017d4a9e8d6d053f24ca30563.tar.xz
clang-tidy: fix misc warnings
The following error reports have started to be reported by clang-tidy: * readability-qualified-auto - add 'const' to `auto&` iterators * bugprone-use-after-move - add break in loop after element is found Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I5314559f62f58aa032d4c74946b8e3e4ce6be808
Diffstat (limited to 'redfish-core/lib')
-rw-r--r--redfish-core/lib/event_service.hpp2
-rw-r--r--redfish-core/lib/update_service.hpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/redfish-core/lib/event_service.hpp b/redfish-core/lib/event_service.hpp
index 29175abe58..9c5b378dd9 100644
--- a/redfish-core/lib/event_service.hpp
+++ b/redfish-core/lib/event_service.hpp
@@ -573,7 +573,7 @@ inline void requestRoutesEventDestination(App& app)
boost::beast::http::fields fields;
for (const nlohmann::json& headerChunk : *headers)
{
- for (auto& it : headerChunk.items())
+ for (const auto& it : headerChunk.items())
{
const std::string* value =
it.value().get_ptr<const std::string*>();
diff --git a/redfish-core/lib/update_service.hpp b/redfish-core/lib/update_service.hpp
index 9acf5689c6..ab99dc306a 100644
--- a/redfish-core/lib/update_service.hpp
+++ b/redfish-core/lib/update_service.hpp
@@ -249,6 +249,8 @@ static void
"xyz.openbmc_project.ObjectMapper", "GetObject", objPath.str,
std::array<const char*, 1>{
"xyz.openbmc_project.Software.Activation"});
+
+ break;
}
}
}