Enable unused variable warnings and resolve
This commit enables the "unused variables" warning in clang. Throughout
this, it did point out several issues that would've been functional
bugs, so I think it was worthwhile. It also cleaned up several unused
variable from old constructs that no longer exist.
Tested:
Built with clang. Code no longer emits warnings.
Downloaded bmcweb to system and pulled up the webui, observed webui
loads and logs in properly.
Change-Id: I51505f4222cc147d6f2b87b14d7e2ac4a74cafa8
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index d1895c4..ac98735 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -304,7 +304,7 @@
auto objectsWithConnectionCb =
[callback](const boost::container::flat_set<std::string>& connections,
const std::set<std::pair<std::string, std::string>>&
- objectsWithConnection) {
+ /*objectsWithConnection*/) {
callback(std::move(connections));
};
getObjectsWithConnection(SensorsAsyncResp, sensorNames,
@@ -2770,7 +2770,7 @@
// Get the connection to which the memberId belongs
auto getObjectsWithConnectionCb =
[sensorAsyncResp, overrideMap](
- const boost::container::flat_set<std::string>& connections,
+ const boost::container::flat_set<std::string>& /*connections*/,
const std::set<std::pair<std::string, std::string>>&
objectsWithConnection) {
if (objectsWithConnection.size() != overrideMap.size())
@@ -3012,7 +3012,7 @@
}
private:
- void doGet(crow::Response& res, const crow::Request& req,
+ void doGet(crow::Response& res, const crow::Request&,
const std::vector<std::string>& params) override
{
BMCWEB_LOG_DEBUG << "SensorCollection doGet enter";
@@ -3084,7 +3084,7 @@
}
private:
- void doGet(crow::Response& res, const crow::Request& req,
+ void doGet(crow::Response& res, const crow::Request&,
const std::vector<std::string>& params) override
{
BMCWEB_LOG_DEBUG << "Sensor doGet enter";