summaryrefslogtreecommitdiff
path: root/include/dbus_monitor.hpp
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2020-07-25 22:02:03 +0300
committerEd Tanous <ed@tanous.net>2020-08-17 23:54:37 +0300
commitcb13a39253848ece442971301ade9c09d98bf08e (patch)
tree62f2a64fbc98d8ee635a0a81f3ef07afa541981d /include/dbus_monitor.hpp
parent23a21a1cbed23ace4174664950e595df961e9e69 (diff)
downloadbmcweb-cb13a39253848ece442971301ade9c09d98bf08e.tar.xz
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>
Diffstat (limited to 'include/dbus_monitor.hpp')
-rw-r--r--include/dbus_monitor.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/dbus_monitor.hpp b/include/dbus_monitor.hpp
index 4a5c7c60ea..3f0b826a9e 100644
--- a/include/dbus_monitor.hpp
+++ b/include/dbus_monitor.hpp
@@ -120,14 +120,15 @@ inline void requestRoutes(App& app)
.privileges({"Login"})
.websocket()
.onopen([&](crow::websocket::Connection& conn,
- std::shared_ptr<bmcweb::AsyncResp> asyncResp) {
+ std::shared_ptr<bmcweb::AsyncResp>) {
BMCWEB_LOG_DEBUG << "Connection " << &conn << " opened";
sessions[&conn] = DbusWebsocketSession();
})
- .onclose([&](crow::websocket::Connection& conn,
- const std::string& reason) { sessions.erase(&conn); })
+ .onclose([&](crow::websocket::Connection& conn, const std::string&) {
+ sessions.erase(&conn);
+ })
.onmessage([&](crow::websocket::Connection& conn,
- const std::string& data, bool is_binary) {
+ const std::string& data, bool) {
DbusWebsocketSession& thisSession = sessions[&conn];
BMCWEB_LOG_DEBUG << "Connection " << &conn << " received " << data;
nlohmann::json j = nlohmann::json::parse(data, nullptr, false);