]> Savannah Git Hosting - gnulib.git/commitdiff
vasnprintf.c: avoid spurious warning from GCC 7
authorJim Meyering <meyering@fb.com>
Sun, 2 Oct 2016 19:09:13 +0000 (12:09 -0700)
committerJim Meyering <meyering@fb.com>
Sun, 2 Oct 2016 19:09:13 +0000 (12:09 -0700)
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
lib/vasnprintf.c

index 7c848c46cccb236c809148e4464bff2e4d26bd5f..7a3171c92260388cfa33228c392c6bb57e6e6c05 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2016-10-02  Jim Meyering  <meyering@fb.com>
+
+       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  <meyering@fb.com>
 
        getprogname: correct the test for a __progname variable
index a4e8b82b82ed836d674e6279fdcb80996e998ddb..375d9755d358c27588521ca52e95ac9a91c32913 100644 (file)
@@ -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