From 25c2aaabcb1fa52b4ab689099d8471f9b81be56c Mon Sep 17 00:00:00 2001 From: zjeffer <4633209+zjeffer@users.noreply.github.com> Date: Sat, 1 Jul 2023 10:05:41 +0200 Subject: [PATCH] Fixed build warnings --- src/modules/network.cpp | 5 +++-- src/util/rfkill.cpp | 7 +++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/network.cpp b/src/modules/network.cpp index 5eef166..3079794 100644 --- a/src/modules/network.cpp +++ b/src/modules/network.cpp @@ -91,10 +91,11 @@ waybar::modules::Network::Network(const std::string &id, const Json::Value &conf cidr_(0), signal_strength_dbm_(0), signal_strength_(0), + frequency_(0.0), #ifdef WANT_RFKILL - rfkill_{RFKILL_TYPE_WLAN}, + rfkill_{RFKILL_TYPE_WLAN} #endif - frequency_(0.0) { +{ // Start with some "text" in the module's label_. update() will then // update it. Since the text should be different, update() will be able diff --git a/src/util/rfkill.cpp b/src/util/rfkill.cpp index 47da3b5..61be7c5 100644 --- a/src/util/rfkill.cpp +++ b/src/util/rfkill.cpp @@ -63,7 +63,7 @@ bool waybar::util::Rfkill::on_event(Glib::IOCondition cond) { return false; } - if (len < RFKILL_EVENT_SIZE_V1) { + if (static_cast(len) < RFKILL_EVENT_SIZE_V1) { spdlog::error("Wrong size of RFKILL event: {} < {}", len, RFKILL_EVENT_SIZE_V1); return true; } @@ -73,10 +73,9 @@ bool waybar::util::Rfkill::on_event(Glib::IOCondition cond) { on_update.emit(event); } return true; - } else { - spdlog::error("Failed to poll RFKILL control device"); - return false; } + spdlog::error("Failed to poll RFKILL control device"); + return false; } bool waybar::util::Rfkill::getState() const { return state_; }