From 44a3eaeba04ef78835ca741592c376428ada5f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 2 Dec 2017 10:30:25 +0100 Subject: New upstream version 0.9.8 --- lib/mbrtowc.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'lib/mbrtowc.c') diff --git a/lib/mbrtowc.c b/lib/mbrtowc.c index 8bd3a01a..41de7ba8 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 , 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 . */ + along with this program. If not, see . */ #include @@ -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 */ + /* Work around bug */ mbtowc (NULL, NULL, 0); # endif { -- cgit v1.2.3