diff --git a/src/helpers.cpp b/src/helpers.cpp index d94496e9..6cecec01 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -18,6 +18,7 @@ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ +#include #include #include #include @@ -298,7 +299,7 @@ int CaseInsensitiveStringComparison::operator()(const std::string &a, const std: bool CaseInsensitiveSorting::operator()(const MPD::Item &a, const MPD::Item &b) { - bool result; + bool result = false; if (a.type == b.type) { switch (a.type) @@ -323,6 +324,8 @@ bool CaseInsensitiveSorting::operator()(const MPD::Item &a, const MPD::Item &b) break; } break; + default: // there is no other option, silence compiler + assert(false); } } else diff --git a/src/lyrics.cpp b/src/lyrics.cpp index 6dd6215d..0a386f0b 100644 --- a/src/lyrics.cpp +++ b/src/lyrics.cpp @@ -375,9 +375,10 @@ void Lyrics::Edit() ShowMessage("Opening lyrics in external editor..."); + GNUC_UNUSED int res; if (Config.use_console_editor) { - system(("/bin/sh -c \"" + Config.external_editor + " \\\"" + itsFilename + "\\\"\"").c_str()); + res = system(("/bin/sh -c \"" + Config.external_editor + " \\\"" + itsFilename + "\\\"\"").c_str()); // below is needed as screen gets cleared, but apparently // ncurses doesn't know about it, so we need to reload main screen endwin(); @@ -385,7 +386,7 @@ void Lyrics::Edit() curs_set(0); } else - system(("nohup " + Config.external_editor + " \"" + itsFilename + "\" > /dev/null 2>&1 &").c_str()); + res = system(("nohup " + Config.external_editor + " \"" + itsFilename + "\" > /dev/null 2>&1 &").c_str()); } #ifdef HAVE_CURL_CURL_H diff --git a/src/status.cpp b/src/status.cpp index 72ffdcda..e2e86eec 100644 --- a/src/status.cpp +++ b/src/status.cpp @@ -386,8 +386,9 @@ void NcmpcppStatusChanged(MPD::Connection *, MPD::StatusChanges changed, void *) { if (myPlaylist->isPlaying()) { + GNUC_UNUSED int res; if (!Config.execute_on_song_change.empty()) - system(Config.execute_on_song_change.c_str()); + res = system(Config.execute_on_song_change.c_str()); # ifdef HAVE_CURL_CURL_H if (Config.fetch_lyrics_in_background)