From 0a4afb9850a6ca342ec111be88ea4d8d795633e8 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 5 Oct 2016 10:43:09 -0700 Subject: [PATCH] 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); ~^~~~~~~~~~~~~~~~~~~~~~~~~~~ --- ChangeLog | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index a4cf1e8810..fd8fb481e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2016-10-05 Jim Meyering + + 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 utimecmp: avoid new GCC 7 warning from -Wbool-operation -- 2.39.5