summaryrefslogtreecommitdiff
path: root/lib/mbrtowc.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-03 20:50:11 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-03 20:50:11 +0100
commit4cf52fc0bc3b80c0ef6c58c5db4413ebdafe661c (patch)
tree676b26b024117cf656080a011e3d17b8fb6889af /lib/mbrtowc.c
parent1ecbfbb92248e67b564f5b144c4671ccaa86ee2f (diff)
parent44ff3127b1e57b703c2a73a24f7ab38e4aad8ae4 (diff)
Merge branch 'release/0.9.8-1'0.9.8-1
Diffstat (limited to 'lib/mbrtowc.c')
-rw-r--r--lib/mbrtowc.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/mbrtowc.c b/lib/mbrtowc.c
index 8bd3a01..41de7ba 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
@@ -22,7 +22,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@@ -44,6 +44,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);
@@ -83,10 +90,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;
@@ -107,7 +114,7 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
/* Here m > 0. */
# if __GLIBC__ || defined __UCLIBC__
- /* Work around bug <http://sourceware.org/bugzilla/show_bug.cgi?id=9674> */
+ /* Work around bug <https://sourceware.org/bugzilla/show_bug.cgi?id=9674> */
mbtowc (NULL, NULL, 0);
# endif
{