Aggregation: Fix cppcheck errors
Corrections style complaints in the aggregator code.
Tested:
Jenkins output did not show any style complaints
Signed-off-by: Carson Labrado <clabrado@google.com>
Change-Id: I87426fcf2a48448a62152e0ad4a6c3aa54a7fc45
diff --git a/redfish-core/include/redfish_aggregator.hpp b/redfish-core/include/redfish_aggregator.hpp
index 926cfd5..c2c2e1d 100644
--- a/redfish-core/include/redfish_aggregator.hpp
+++ b/redfish-core/include/redfish_aggregator.hpp
@@ -145,7 +145,7 @@
}
static inline void addAggregatedHeaders(crow::Response& asyncResp,
- crow::Response& resp,
+ const crow::Response& resp,
std::string_view prefix)
{
if (!resp.getHeaderValue("Content-Type").empty())
diff --git a/test/redfish-core/include/redfish_aggregator_test.cpp b/test/redfish-core/include/redfish_aggregator_test.cpp
index 4653a81..838e5ed 100644
--- a/test/redfish-core/include/redfish_aggregator_test.cpp
+++ b/test/redfish-core/include/redfish_aggregator_test.cpp
@@ -381,7 +381,7 @@
bool foundLocal = false;
bool foundSat = false;
- for (auto& member : asyncResp->res.jsonValue["Members"])
+ for (const auto& member : asyncResp->res.jsonValue["Members"])
{
if (member["@odata.id"] == "/redfish/v1/Systems/system")
{