[Xfce4-commits] [xfce/xfwm4] 30/32: Fix some build warnings
noreply at xfce.org
noreply at xfce.org
Tue Dec 5 09:22:16 CET 2017
This is an automated email from the git hooks/post-receive script.
o l i v i e r p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfwm4.
commit 68b6854d5326149bd43ccf66ce7aaa6cde7901a0
Author: Viktor Odintsev <ninetls at xfce.org>
Date: Wed Nov 22 07:20:46 2017 +0300
Fix some build warnings
---
Makefile.am | 2 ++
configure.ac.in | 1 +
src/cycle.c | 2 +-
src/misc.h | 6 ++++++
src/mypixmap.c | 2 ++
src/netwm.c | 2 +-
6 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 0da25ab..a689f27 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,7 @@
@SET_MAKE@
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
+
EXTRA_DIST = \
example.gtkrc-2.0 \
intltool-extract.in \
diff --git a/configure.ac.in b/configure.ac.in
index a9f951c..fb06b57 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -32,6 +32,7 @@ Written for Xfce by Olivier Fourdan <fourdan at xfce.org>.])
AC_INIT([xfwm4], [xfwm4_version], [xfce4-dev at xfce.org])
AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar no-dist-gzip])
+AC_CONFIG_MACRO_DIRS([m4])
AC_CONFIG_HEADERS([config.h])
AM_MAINTAINER_MODE()
diff --git a/src/cycle.c b/src/cycle.c
index eb32a86..60488c4 100644
--- a/src/cycle.c
+++ b/src/cycle.c
@@ -282,7 +282,7 @@ clientCycleEventFilter (XEvent * xevent, gpointer data)
if ((removed = myScreenGetClientFromWindow (screen_info, ((XDestroyWindowEvent *) xevent)->window, SEARCH_WINDOW)) == NULL)
break; /* No need to go any further */
gone |= (c == removed);
- /* Walk through */
+ FALLTHROUGH;
case UnmapNotify:
status = EVENT_FILTER_CONTINUE;
if (!removed && (removed = myScreenGetClientFromWindow (screen_info, ((XUnmapEvent *) xevent)->window, SEARCH_WINDOW)) == NULL)
diff --git a/src/misc.h b/src/misc.h
index 2416b7d..96fb0d0 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -33,6 +33,12 @@
#include <glib.h>
#include "screen.h"
+#if defined (__GNUC__) && __GNUC__ >= 7
+#define FALLTHROUGH __attribute__ ((fallthrough))
+#else
+#define FALLTHROUGH
+#endif
+
/*
Just for completion, being a bit pedantic, X seems to be missing
those so far, so create them for now.
diff --git a/src/mypixmap.c b/src/mypixmap.c
index 7d84e6f..334f159 100644
--- a/src/mypixmap.c
+++ b/src/mypixmap.c
@@ -492,11 +492,13 @@ file_buffer (enum buf_op op, gpointer handle)
break;
}
/* Fall through to the next xpm_seek_char. */
+ FALLTHROUGH;
case op_cmap:
xpm_seek_char (h->infile, '"');
fseek (h->infile, -1, SEEK_CUR);
/* Fall through to the xpm_read_string. */
+ FALLTHROUGH;
case op_body:
if(!xpm_read_string (h->infile, &h->buffer, &h->buffer_size))
diff --git a/src/netwm.c b/src/netwm.c
index 12a220e..bc354c6 100644
--- a/src/netwm.c
+++ b/src/netwm.c
@@ -692,7 +692,7 @@ clientNetMoveResize (Client * c, XClientMessageEvent * ev)
break;
case NET_WM_MOVERESIZE_CANCEL:
FLAG_UNSET (c->xfwm_flags, XFWM_FLAG_MOVING_RESIZING);
- /* Walk through */
+ FALLTHROUGH;
default: /* Do nothing */
return;
break;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list