This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ 14176] Do not warn about mblen, mbtowc and wctombunused result
- From: OndÅej BÃlka <neleai at seznam dot cz>
- To: libc-alpha at sourceware dot org
- Date: Mon, 11 Mar 2013 10:46:28 +0100
- Subject: Re: [PATCH][BZ 14176] Do not warn about mblen, mbtowc and wctombunused result
- References: <20130301145722.GA23039@domone.kolej.mff.cuni.cz>
Ping,
for me it almost looks obvious.
On Fri, Mar 01, 2013 at 03:57:22PM +0100, OndÅej BÃlka wrote:
> Hi,
>
> This fixes simple bug that when mblen, mbtowc and wctomb show false
> positive warning.
> This happens when string is NULL to reset shift state.
>
> 2013-03-01 OndÅej BÃlka <neleai@seznam.cz>
>
> [BZ 14176]
> * stdlib/stdlib.h (mblen, mbtowc, wctomb): Remove __wur.
>
> diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h
> index f7a818a..4b83944 100644
> --- a/stdlib/stdlib.h
> +++ b/stdlib/stdlib.h
> @@ -861,14 +861,14 @@ extern int qfcvt_r (long double __value, int __ndigit,
> __BEGIN_NAMESPACE_STD
> /* Return the length of the multibyte character
> in S, which is no longer than N. */
> -extern int mblen (const char *__s, size_t __n) __THROW __wur;
> +extern int mblen (const char *__s, size_t __n) __THROW;
> /* Return the length of the given multibyte character,
> putting its `wchar_t' representation in *PWC. */
> extern int mbtowc (wchar_t *__restrict __pwc,
> - const char *__restrict __s, size_t __n) __THROW __wur;
> + const char *__restrict __s, size_t __n) __THROW;
> /* Put the multibyte character represented
> by WCHAR in S, returning its length. */
> -extern int wctomb (char *__s, wchar_t __wchar) __THROW __wur;
> +extern int wctomb (char *__s, wchar_t __wchar) __THROW;
>
>
> /* Convert a multibyte string to a wide char string. */
--
Bit rot