summaryrefslogtreecommitdiff
path: root/lib/mbrtowc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mbrtowc.c')
-rw-r--r--lib/mbrtowc.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/mbrtowc.c b/lib/mbrtowc.c
index cdd874b..7415fff 100644
--- a/lib/mbrtowc.c
+++ b/lib/mbrtowc.c
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 1999-2002, 2005-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2005-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -35,6 +35,13 @@
# include "streq.h"
# include "verify.h"
+#ifndef FALLTHROUGH
+# if __GNUC__ < 7
+# define FALLTHROUGH ((void) 0)
+# else
+# define FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
+#endif
verify (sizeof (mbstate_t) >= 4);
@@ -74,10 +81,10 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
break;
case 3:
buf[2] = pstate[3];
- /*FALLTHROUGH*/
+ FALLTHROUGH;
case 2:
buf[1] = pstate[2];
- /*FALLTHROUGH*/
+ FALLTHROUGH;
case 1:
buf[0] = pstate[1];
p = buf;