Skip to content

Commit

Permalink
Merge pull request #2266 from zjeffer/master
Browse files Browse the repository at this point in the history
Fixed some build warnings
  • Loading branch information
Alexays authored Jul 1, 2023
2 parents 4116490 + 25c2aaa commit b62e5eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/modules/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions src/util/rfkill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ bool waybar::util::Rfkill::on_event(Glib::IOCondition cond) {
return false;
}

if (len < RFKILL_EVENT_SIZE_V1) {
if (static_cast<size_t>(len) < RFKILL_EVENT_SIZE_V1) {
spdlog::error("Wrong size of RFKILL event: {} < {}", len, RFKILL_EVENT_SIZE_V1);
return true;
}
Expand All @@ -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_; }

0 comments on commit b62e5eb

Please sign in to comment.