bmcweb: Fix a bunch of warnings
bmcweb classically has not taken a strong opinion on warnings. With
this commit, that policy is changing, and bmcweb will invoke the best
warnings we are able to enable, and turn on -Werror for all builds.
This is intended to reduce the likelihood of hard-to-debug situations
that the compiler coulve caught early on.
Change-Id: I57474410821e82666b3a108cfd0db7d070e8900a
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index f9c2f38..0aa4478 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -785,10 +785,10 @@
for (auto& step : *steps)
{
double target;
- double output;
+ double out;
if (!redfish::json_util::readJson(step, response->res, "Target",
- target, "Output", output))
+ target, "Output", out))
{
BMCWEB_LOG_ERROR << "Line:" << __LINE__
<< ", Illegal Property "
@@ -796,7 +796,7 @@
return CreatePIDRet::fail;
}
readings.emplace_back(target);
- outputs.emplace_back(output);
+ outputs.emplace_back(out);
}
output["Reading"] = std::move(readings);
output["Output"] = std::move(outputs);