Fix a few compiler warnings

There was one uninitialized value warning and two mismatched-sign
compare warnings. They both appear valid, the first occurring when MPD's
"format-stopped" contains {songPosition} or {queueLength} and the second
occurring when the clock's "timezones" array is more than 2 billion
items long (not likely, I admit). Fix both issues.
This commit is contained in:
Thomas Hebb
2020-11-30 18:07:22 -08:00
parent 14a6cec6d1
commit 29f78e0426
2 changed files with 5 additions and 7 deletions

View File

@ -100,7 +100,7 @@ void waybar::modules::MPD::setLabel() {
auto format = format_;
std::string artist, album_artist, album, title, date;
int song_pos, queue_length;
int song_pos = 0, queue_length = 0;
std::chrono::seconds elapsedTime, totalTime;
std::string stateIcon = "";