summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/dbus_monitor.hpp2
-rw-r--r--include/openbmc_dbus_rest.hpp2
-rw-r--r--redfish-core/include/utils/json_utils.hpp2
-rw-r--r--redfish-core/lib/event_service.hpp2
-rw-r--r--redfish-core/lib/update_service.hpp2
5 files changed, 6 insertions, 4 deletions
diff --git a/include/dbus_monitor.hpp b/include/dbus_monitor.hpp
index 129422e4ae..5f409d7d70 100644
--- a/include/dbus_monitor.hpp
+++ b/include/dbus_monitor.hpp
@@ -84,7 +84,7 @@ inline int onPropertyUpdate(sd_bus_message* m, void* userdata,
}
// data is type oa{sa{sv}} which is an array[2] of string, object
- for (auto& entry : data[1].items())
+ for (const auto& entry : data[1].items())
{
auto it = thisSession->second.interfaces.find(entry.key());
if (it != thisSession->second.interfaces.end())
diff --git a/include/openbmc_dbus_rest.hpp b/include/openbmc_dbus_rest.hpp
index d8a4e66d6f..95503d706e 100644
--- a/include/openbmc_dbus_rest.hpp
+++ b/include/openbmc_dbus_rest.hpp
@@ -1768,7 +1768,7 @@ inline void handleGet(const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
}
else
{
- for (auto& prop : properties.items())
+ for (const auto& prop : properties.items())
{
// if property name is empty, or
// matches our search query, add it
diff --git a/redfish-core/include/utils/json_utils.hpp b/redfish-core/include/utils/json_utils.hpp
index 0d4bee2807..a7a27ffb2a 100644
--- a/redfish-core/include/utils/json_utils.hpp
+++ b/redfish-core/include/utils/json_utils.hpp
@@ -410,7 +410,7 @@ inline bool readJsonHelper(nlohmann::json& jsonRequest, crow::Response& res,
messages::unrecognizedRequestBody(res);
return false;
}
- for (auto& item : jsonRequest.items())
+ for (const auto& item : jsonRequest.items())
{
size_t unpackIndex = 0;
for (; unpackIndex < toUnpack.size(); unpackIndex++)
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;
}
}
}