From: Bruno Haible Date: Sun, 1 Jun 2025 10:26:40 +0000 (+0200) Subject: Avoid warnings from "gcc -Wextra". X-Git-Tag: v0.26~140 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0ec47cb58fa9804c7aa79ae594c9fcc2e98774a7;p=thirdparty%2Fgettext.git Avoid warnings from "gcc -Wextra". Reported by Collin Funk in . * gnulib-local/lib/gettext.h (gettext, dgettext, dcgettext): Silence -Wbuiltin-declaration-mismatch warning. --- diff --git a/gnulib-local/lib/gettext.h b/gnulib-local/lib/gettext.h index e7b1f88b3..37d58f013 100644 --- a/gnulib-local/lib/gettext.h +++ b/gnulib-local/lib/gettext.h @@ -66,6 +66,10 @@ that don't occur with enabled NLS. */ /* The return type 'const char *' serves the purpose of producing warnings for invalid uses of the value returned from these functions. */ +# if __GNUC__ >= 9 +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wbuiltin-declaration-mismatch" +# endif __attribute__ ((__always_inline__, __gnu_inline__)) extern inline # if !defined(__sun) const @@ -96,6 +100,9 @@ dcgettext (const char *domain, const char *msgid, int category) (void) category; return msgid; } +# if __GNUC__ >= 9 +# pragma GCC diagnostic pop +# endif # else /* The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. */