From e63f5eb55570a1ea3e51ce47df33689785e085c1 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 2 Oct 2016 12:09:13 -0700 Subject: [PATCH] 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 --- ChangeLog | 11 +++++++++++ lib/vasnprintf.c | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7c848c4..7a3171c 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 a4e8b82..375d975 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 -- 2.7.4