diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2017-05-16 09:23:52 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2017-05-16 09:32:31 -0700 |
commit | 5e22aee79f9d02ac37f40f1d18f5696114c3c3c9 (patch) | |
tree | 4aaf6260ac32cc633d0513dbf58b396ca8c9ad99 /tests/test-sigpipe.c | |
parent | 0414a24cf57f1569b0b4f2a0f22898a0943dfc14 (diff) | |
download | gnulib-5e22aee79f9d02ac37f40f1d18f5696114c3c3c9.tar.gz |
manywarnings: update for GCC 7
* build-aux/gcc-warning.spec:
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
Add GCC 7 warnings, notably -Wimplicit-fallthrough=5, which
requires a non-comment fallthrough attribute. This is a bit
cleaner than the comment versions.
* lib/strftime.c, lib/dfa.c, lib/fnmatch.c, lib/mbrtowc.c:
* lib/vasnprintf.c, tests/macros.h (FALLTHROUGH): New macro.
Use it whenever one switch case falls through into the next.
Diffstat (limited to 'tests/test-sigpipe.c')
-rw-r--r-- | tests/test-sigpipe.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test-sigpipe.c b/tests/test-sigpipe.c index 48b22f1044..e75372d1d7 100644 --- a/tests/test-sigpipe.c +++ b/tests/test-sigpipe.c @@ -26,6 +26,8 @@ int s = SIGPIPE; #include <stdlib.h> #include <unistd.h> +#include "macros.h" + static void handler (int sig) { @@ -57,7 +59,7 @@ main (int argc, char **argv) case 'B': /* The write() call should have failed with EPIPE. */ if (ret < 0 && errno == EPIPE) exit (0); - /*FALLTHROUGH*/ + FALLTHROUGH; case 'A': /* The process should silently die. */ case 'C': /* The handler should have been called. */ fprintf (stderr, "write() returned %d with error %d.\n", ret, errno); |