]> Savannah Git Hosting - gnulib.git/commitdiff
long-options: avoid new GCC 7 warning from -Wimplicit-fallthrough
authorJim Meyering <meyering@fb.com>
Wed, 5 Oct 2016 17:43:09 +0000 (10:43 -0700)
committerJim Meyering <meyering@fb.com>
Wed, 12 Oct 2016 04:50:06 +0000 (21:50 -0700)
* lib/long-options.c (parse_long_options): Add a break statement
to avoid this new warning/failure:
$ CFLAGS='-O -Werror=implicit-fallthrough' ./gnulib-tool \
  --create-testdir --dir=/t/x --with-tests --test long-options
../../gllib/long-options.c: In function 'parse_long_options':
../../gllib/long-options.c:66:12: error: this statement may \
  fall through [-Werror=implicit-fallthrough]
           (*usage_func) (EXIT_SUCCESS);
           ~^~~~~~~~~~~~~~~~~~~~~~~~~~~

ChangeLog

index a4cf1e8810e27d9b98d347b3be7d0ce04767eae5..fd8fb481e4ef111efdbfbeca7bb1ab3f8b829e29 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2016-10-05  Jim Meyering  <meyering@fb.com>
+
+       long-options: avoid new GCC 7 warning from -Wimplicit-fallthrough
+       * lib/long-options.c (parse_long_options): Add a break statement
+       to avoid this new warning/failure:
+       $ CFLAGS='-O -Werror=implicit-fallthrough' ./gnulib-tool \
+         --create-testdir --dir=/t/x --with-tests --test long-options
+       ../../gllib/long-options.c: In function 'parse_long_options':
+       ../../gllib/long-options.c:66:12: error: this statement may \
+         fall through [-Werror=implicit-fallthrough]
+                  (*usage_func) (EXIT_SUCCESS);
+                  ~^~~~~~~~~~~~~~~~~~~~~~~~~~~
+
 2016-10-05  Jim Meyering  <meyering@fb.com>
 
        utimecmp: avoid new GCC 7 warning from -Wbool-operation