[gnome-commander/ConvertWarningsToErrors] src/gnome-cmd-hintbox.cc: fix for -Wimplicit-fallthrough
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander/ConvertWarningsToErrors] src/gnome-cmd-hintbox.cc: fix for -Wimplicit-fallthrough
- Date: Mon, 24 Apr 2017 19:28:42 +0000 (UTC)
commit bc60ac14ba10912e3ba32a5183020f018e08a3c7
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]