[PATCH] Fix build warnings in regex.c, bug-regex20.c, bug-regex33.c

Thomas Schwinge thomas@codesourcery.com
Thu Feb 14 11:36:00 GMT 2013


Hi!

On Thu, 14 Feb 2013 11:34:03 +0530, Siddhesh Poyarekar <siddhesh@redhat.com> wrote:
> The patch below marks these functions as possibly unused since any
> file that includes regex_internal.h may not necessarily use all of the
> functions defined.

> --- a/locale/elem-hash.h
> +++ b/locale/elem-hash.h
> @@ -18,7 +18,7 @@
>  
>  
>  /* The hashing function used for the table with collation symbols.  */
> -static int32_t
> +static int32_t __attribute ((pure, unused))
>  elem_hash (const char *str, int_fast32_t n)
>  {
>    int32_t result = n;

Wouldn't marking them as always_inline (which is the intention here, I
think?) also make that warning go away?


Grüße,
 Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20130214/8450fb2c/attachment.sig>


More information about the Libc-alpha mailing list