From: Jim Meyering Date: Sun, 2 Oct 2016 19:09:13 +0000 (-0700) Subject: vasnprintf.c: avoid spurious warning from GCC 7 X-Git-Tag: v1.0~6620 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=e63f5eb55570a1ea3e51ce47df33689785e085c1;p=gnulib.git vasnprintf.c: avoid spurious warning from GCC 7 The presence of cpp directives renders this "FALLTHROUGH" comment ineffective, so does not suppress the -Wimplicit-fallthrough warning from GCC 7 built from git on 2016-10-02. * lib/vasnprintf.c (VASNPRINTF): Move comment down past two cpp directives, so that it takes effect once again. This is clearly not a proper change, and I will revert it once this bug is fixed: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817 --- diff --git a/ChangeLog b/ChangeLog index 7c848c46cc..7a3171c922 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2016-10-02 Jim Meyering + + vasnprintf.c: avoid spurious warning from GCC 7 + The presence of cpp directives renders this "FALLTHROUGH" comment + ineffective, so does not suppress the -Wimplicit-fallthrough warning + from GCC 7 built from git on 2016-10-02. + * lib/vasnprintf.c (VASNPRINTF): Move comment down past two cpp + directives, so that it takes effect once again. This is clearly + not a proper change, and I will revert it once this bug is fixed: + https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77817 + 2016-10-01 Jim Meyering getprogname: correct the test for a __progname variable diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c index a4e8b82b82..375d9755d3 100644 --- a/lib/vasnprintf.c +++ b/lib/vasnprintf.c @@ -4832,9 +4832,9 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, break; # else *fbp++ = 'l'; - /*FALLTHROUGH*/ # endif #endif + /*FALLTHROUGH*/ case TYPE_LONGINT: case TYPE_ULONGINT: #if HAVE_WINT_T