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/include/ibm/management_console_rest.hpp b/include/ibm/management_console_rest.hpp
index db1e9f3..6b77018 100644
--- a/include/ibm/management_console_rest.hpp
+++ b/include/ibm/management_console_rest.hpp
@@ -532,7 +532,7 @@
}
}
-void handleGetLockListAPI(const crow::Request& req, crow::Response& res,
+void handleGetLockListAPI(crow::Response& res,
const ListOfSessionIds& listSessionIds)
{
BMCWEB_LOG_DEBUG << listSessionIds.size();
@@ -581,7 +581,7 @@
BMCWEB_ROUTE(app, "/ibm/v1/")
.privileges({"ConfigureComponents", "ConfigureManager"})
.methods(boost::beast::http::verb::get)(
- [](const crow::Request& req, crow::Response& res) {
+ [](const crow::Request&, crow::Response& res) {
res.jsonValue["@odata.type"] =
"#ibmServiceRoot.v1_0_0.ibmServiceRoot";
res.jsonValue["@odata.id"] = "/ibm/v1/";
@@ -599,7 +599,7 @@
BMCWEB_ROUTE(app, "/ibm/v1/Host/ConfigFiles")
.privileges({"ConfigureComponents", "ConfigureManager"})
.methods(boost::beast::http::verb::get)(
- [](const crow::Request& req, crow::Response& res) {
+ [](const crow::Request&, crow::Response& res) {
handleConfigFileList(res);
});
@@ -607,7 +607,7 @@
"/ibm/v1/Host/ConfigFiles/Actions/IBMConfigFiles.DeleteAll")
.privileges({"ConfigureComponents", "ConfigureManager"})
.methods(boost::beast::http::verb::post)(
- [](const crow::Request& req, crow::Response& res) {
+ [](const crow::Request&, crow::Response& res) {
deleteConfigFiles(res);
});
@@ -621,7 +621,7 @@
BMCWEB_ROUTE(app, "/ibm/v1/HMC/LockService")
.privileges({"ConfigureComponents", "ConfigureManager"})
.methods(boost::beast::http::verb::get)(
- [](const crow::Request& req, crow::Response& res) {
+ [](const crow::Request&, crow::Response& res) {
getLockServiceData(res);
});
@@ -682,7 +682,7 @@
res.end();
return;
}
- handleGetLockListAPI(req, res, listSessionIds);
+ handleGetLockListAPI(res, listSessionIds);
});
BMCWEB_ROUTE(app, "/ibm/v1/HMC/BroadcastService")