aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygserver
diff options
context:
space:
mode:
authorKen Brown <kbrown@cornell.edu>2020-08-07 09:48:28 -0400
committerKen Brown <kbrown@cornell.edu>2020-08-07 13:40:13 -0400
commit225d376b70f92bbb68b57b928a29044ab3c30acf (patch)
tree4fe7edb099b8c86f3e34a975bc679ce6062c1a3a /winsup/cygserver
parent1be41b802ae151f0dbc4e67fd3fd1cc563978643 (diff)
downloadnewlib-225d376b70f92bbb68b57b928a29044ab3c30acf.zip
newlib-225d376b70f92bbb68b57b928a29044ab3c30acf.tar.gz
newlib-225d376b70f92bbb68b57b928a29044ab3c30acf.tar.bz2
Cygwin: cygserver: build with -Wimplicit-fallthrough=5
Define the pseudo keyword 'fallthrough' in woutsup.h to support this.
Diffstat (limited to 'winsup/cygserver')
-rw-r--r--winsup/cygserver/Makefile.in2
-rw-r--r--winsup/cygserver/bsd_helper.cc2
-rw-r--r--winsup/cygserver/bsd_mutex.cc2
-rw-r--r--winsup/cygserver/woutsup.h2
4 files changed, 5 insertions, 3 deletions
diff --git a/winsup/cygserver/Makefile.in b/winsup/cygserver/Makefile.in
index bbdfc25..70f3823 100644
--- a/winsup/cygserver/Makefile.in
+++ b/winsup/cygserver/Makefile.in
@@ -16,7 +16,7 @@ export CXX:=@CXX@
CFLAGS:=@CFLAGS@
override CXXFLAGS=@CXXFLAGS@
-override CXXFLAGS+=-MMD -Wimplicit-fallthrough=4 -Werror -D__OUTSIDE_CYGWIN__ -DSYSCONFDIR="\"$(sysconfdir)\""
+override CXXFLAGS+=-MMD -Wimplicit-fallthrough=5 -Werror -D__OUTSIDE_CYGWIN__ -DSYSCONFDIR="\"$(sysconfdir)\""
include ${srcdir}/../Makefile.common
diff --git a/winsup/cygserver/bsd_helper.cc b/winsup/cygserver/bsd_helper.cc
index ecc90e1..3863964 100644
--- a/winsup/cygserver/bsd_helper.cc
+++ b/winsup/cygserver/bsd_helper.cc
@@ -120,7 +120,7 @@ ipcexit_hookthread (const LPVOID param)
{
case WAIT_OBJECT_0:
/* Cygserver shutdown. */
- /*FALLTHRU*/
+ fallthrough;
case WAIT_OBJECT_0 + 1:
/* Process exited. Call semexit_myhook to handle SEM_UNDOs for the
exiting process and shmexit_myhook to keep track of shared
diff --git a/winsup/cygserver/bsd_mutex.cc b/winsup/cygserver/bsd_mutex.cc
index 13c5f90..0cda87a 100644
--- a/winsup/cygserver/bsd_mutex.cc
+++ b/winsup/cygserver/bsd_mutex.cc
@@ -326,7 +326,7 @@ _msleep (void *ident, struct mtx *mtx, int priority,
break;
case WAIT_OBJECT_0 + 1: /* Shutdown event (triggered by wakeup_all). */
priority |= PDROP;
- /*FALLTHRU*/
+ fallthrough;
case WAIT_OBJECT_0 + 2: /* The dependent process has exited. */
debug ("msleep process exit or shutdown for %d", td->td_proc->winpid);
ret = EIDRM;
diff --git a/winsup/cygserver/woutsup.h b/winsup/cygserver/woutsup.h
index 272f978..7b799f1 100644
--- a/winsup/cygserver/woutsup.h
+++ b/winsup/cygserver/woutsup.h
@@ -12,6 +12,8 @@ details. */
#error "woutsup.h is not for code being compiled inside the dll"
#endif
+#define fallthrough __attribute__((__fallthrough__))
+
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0500
#endif