]> Savannah Git Hosting - gnulib.git/commitdiff
u8-uctomb-aux.c: build: placate GCC 7's new -Wimplicit-fallthrough
authorJim Meyering <meyering@fb.com>
Thu, 29 Sep 2016 04:36:55 +0000 (21:36 -0700)
committerJim Meyering <meyering@fb.com>
Thu, 29 Sep 2016 04:36:55 +0000 (21:36 -0700)
* lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Mark each end of
fall-through case with a /* fallthrough */ comment.

ChangeLog
lib/unistr/u8-uctomb-aux.c

index 06174b6efbad8be214dedf196c346038fcd68d54..e9b4c80fee9193895f66f8f79c88646d0e2d4fad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2016-09-28  Jim Meyering  <meyering@fb.com>
 
+       u8-uctomb-aux.c: build: placate GCC 7's new -Wimplicit-fallthrough
+       * lib/unistr/u8-uctomb-aux.c (u8_uctomb_aux): Mark each end of
+       fall-through case with a /* fallthrough */ comment.
+
        dfa: build: avoid warning from GCC 7's new -Wimplicit-fallthrough
        * lib/dfa.c (dfassbuild): Mark the end of this case with a
        /* fallthrough */ comment.
index 48adae10e3fac1ceab381160a26de1956e739c21..a41ffcf5a2ba53dbd29d182d934c66ff106e0807 100644 (file)
@@ -61,7 +61,9 @@ u8_uctomb_aux (uint8_t *s, ucs4_t uc, int n)
     case 5: s[4] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x200000;
 #endif
     case 4: s[3] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x10000;
+      /* fallthrough */
     case 3: s[2] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0x800;
+      /* fallthrough */
     case 2: s[1] = 0x80 | (uc & 0x3f); uc = uc >> 6; uc |= 0xc0;
   /*case 1:*/ s[0] = uc;
     }