[gnome-commander] src/gnome-cmd-hintbox.cc: fix for -Wimplicit-fallthrough



commit 0e895fb0b7afd598e6b03196ab29370807cfbe83
Author: Mamoru TASAKA <mtasaka fedoraproject org>
Date:   Mon Apr 24 12:54:39 2017 +0900

    src/gnome-cmd-hintbox.cc: fix for -Wimplicit-fallthrough
    
    ../src/gnome-cmd-hintbox.cc: In function 'void gnome_cmd_label_set_attributes(GtkLabel*, ...)':
    /usr/include/glib-2.0/glib/gmessages.h:334:31: error: this statement may fall through 
[-Werror=implicit-fallthrough=]
    
    src/gnome-cmd-hintbox.cc:336:11: note: in expansion of macro 'g_warning'
               g_warning ("%s: invalid PangoAttribute type %d",
               ^~~~~~~~~
    src/gnome-cmd-hintbox.cc:338:9: note: here
             case PANGO_ATTR_INVALID:
             ^~~~

 src/gnome-cmd-hintbox.cc |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gnome-cmd-hintbox.cc b/src/gnome-cmd-hintbox.cc
index d7a103f..b9b5d77 100644
--- a/src/gnome-cmd-hintbox.cc
+++ b/src/gnome-cmd-hintbox.cc
@@ -335,6 +335,9 @@ gnome_cmd_label_set_attributes (GtkLabel *label, ...)
         default:
           g_warning ("%s: invalid PangoAttribute type %d",
                      G_STRFUNC, attr_type);
+#if defined (__GNUC__) && __GNUC__ >= 7
+          __attribute__ ((fallthrough));
+#endif
         case PANGO_ATTR_INVALID:
           attr = NULL;
           break;


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