[gnome-commander/ConvertWarningsToErrors] Suppress warnings about missing switch cases



commit 1665d3e7404e036f2252f3b5f9eb011c7f1c7a2e
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Sat Apr 22 12:08:41 2017 +0200

    Suppress warnings about missing switch cases

 src/gnome-cmd-con.cc |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-cmd-con.cc b/src/gnome-cmd-con.cc
index a671388..30265bc 100644
--- a/src/gnome-cmd-con.cc
+++ b/src/gnome-cmd-con.cc
@@ -244,6 +244,10 @@ static gboolean check_con_open_progress (GnomeCmdCon *con)
     g_return_val_if_fail (GNOME_CMD_IS_CON (con), FALSE);
     g_return_val_if_fail (con->open_result != GnomeCmdCon::OPEN_NOT_STARTED, FALSE);
 
+#if defined (__GNUC__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wswitch-enum"
+#endif
     switch (con->open_result)
     {
         case GnomeCmdCon::OPEN_IN_PROGRESS:
@@ -273,6 +277,9 @@ static gboolean check_con_open_progress (GnomeCmdCon *con)
         default:
             return FALSE;
     }
+#if defined (__GNUC__)
+#pragma GCC diagnostic pop
+#endif
 }
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]