From: Jim Meyering Date: Thu, 29 Sep 2016 04:36:55 +0000 (-0700) Subject: u8-uctomb-aux.c: build: placate GCC 7's new -Wimplicit-fallthrough X-Git-Tag: v1.0~6622 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=5f7358cc193d40a8e2c37409d437d7f0f2a0f9b1;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 06174b6efb..e9b4c80fee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2016-09-28 Jim Meyering + 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. diff --git a/lib/unistr/u8-uctomb-aux.c b/lib/unistr/u8-uctomb-aux.c index 48adae10e3..a41ffcf5a2 100644 --- a/lib/unistr/u8-uctomb-aux.c +++ b/lib/unistr/u8-uctomb-aux.c @@ -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; }