Reported by Andreas Schwab <schwab@suse.de> in
<https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00127.html>.
* lib/unistr/u8-uctomb.c (FALLTHROUGH): New macro.
(u8_uctomb): Add FALLTHROUGH markers.
+2020-01-20 Bruno Haible <bruno@clisp.org>
+
+ unistr/u8-uctomb: Fix warning.
+ Reported by Andreas Schwab <schwab@suse.de> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2020-01/msg00127.html>.
+ * lib/unistr/u8-uctomb.c (FALLTHROUGH): New macro.
+ (u8_uctomb): Add FALLTHROUGH markers.
+
2020-01-20 Bruno Haible <bruno@clisp.org>
lock: Fix test-once1 failure on FreeBSD 11 (regression from 2020-01-19).
/* Specification. */
#include "unistr.h"
+#ifndef FALLTHROUGH
+# if __GNUC__ < 7
+# define FALLTHROUGH ((void) 0)
+# else
+# define FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
+#endif
+
#if !HAVE_INLINE
int
switch (count) /* note: code falls through cases! */
{
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;
}