[gnome-commander/ConvertWarningsToErrors] src/main.cc: fix for -Wswitch-enum
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/ConvertWarningsToErrors] src/main.cc: fix for -Wswitch-enum
- Date: Fri, 28 Apr 2017 17:11:47 +0000 (UTC)
commit f8f5729054c6ad6f0c4f4901d646c1dc39a29b07
Author: Mamoru TASAKA <mtasaka fedoraproject org>
Date: Fri Apr 28 18:38:08 2017 +0900
src/main.cc: fix for -Wswitch-enum
src/main.cc:78:12: error: enumeration value 'UNIQUE_INVALID' not handled in switch [-Werror=switch-enum]
likewise
src/main.cc | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/main.cc b/src/main.cc
index 9bba4ad..0bd25d7 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -75,6 +75,10 @@ static const GOptionEntry options [] =
#ifdef HAVE_UNIQUE
static UniqueResponse on_message_received (UniqueApp *app, UniqueCommand cmd, UniqueMessageData *msg, guint
t, gpointer user_data)
{
+#if defined (__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wswitch-enum"
+#endif
switch (cmd)
{
case UNIQUE_ACTIVATE:
@@ -86,6 +90,9 @@ static UniqueResponse on_message_received (UniqueApp *app, UniqueCommand cmd, Un
default:
break;
}
+#if defined (__GNUC__)
+#pragma GCC diagnostic pop
+#endif
return UNIQUE_RESPONSE_OK;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]