From 113893dce80358a4ae0d9463ce73c5670c81cf0c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 3 Jul 2018 23:14:22 +0200 Subject: [PATCH] Make the format_arg attribute effective also in the case _INTL_REDIRECT_INLINE. Reported by Tom Tromey in . * gettext-runtime/intl/libgnuintl.in.h (gettext, dgettext, dcgettext, ngettext, dngettext, dcngettext): Add attribute __format_arg__ also to the 'static inline' functions. --- gettext-runtime/intl/libgnuintl.in.h | 33 ++++++++++++++++++---------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/gettext-runtime/intl/libgnuintl.in.h b/gettext-runtime/intl/libgnuintl.in.h index 3aba82ae1..019c6e115 100644 --- a/gettext-runtime/intl/libgnuintl.in.h +++ b/gettext-runtime/intl/libgnuintl.in.h @@ -123,7 +123,9 @@ extern int libintl_version; #ifdef _INTL_REDIRECT_INLINE extern char *libintl_gettext (const char *__msgid) _INTL_MAY_RETURN_STRING_ARG (1); -static inline char *gettext (const char *__msgid) +static inline +_INTL_MAY_RETURN_STRING_ARG (1) +char *gettext (const char *__msgid) { return libintl_gettext (__msgid); } @@ -141,7 +143,9 @@ extern char *gettext (const char *__msgid) #ifdef _INTL_REDIRECT_INLINE extern char *libintl_dgettext (const char *__domainname, const char *__msgid) _INTL_MAY_RETURN_STRING_ARG (2); -static inline char *dgettext (const char *__domainname, const char *__msgid) +static inline +_INTL_MAY_RETURN_STRING_ARG (2) +char *dgettext (const char *__domainname, const char *__msgid) { return libintl_dgettext (__domainname, __msgid); } @@ -160,8 +164,9 @@ extern char *dgettext (const char *__domainname, const char *__msgid) extern char *libintl_dcgettext (const char *__domainname, const char *__msgid, int __category) _INTL_MAY_RETURN_STRING_ARG (2); -static inline char *dcgettext (const char *__domainname, const char *__msgid, - int __category) +static inline +_INTL_MAY_RETURN_STRING_ARG (2) +char *dcgettext (const char *__domainname, const char *__msgid, int __category) { return libintl_dcgettext (__domainname, __msgid, __category); } @@ -182,8 +187,10 @@ extern char *dcgettext (const char *__domainname, const char *__msgid, extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2); -static inline char *ngettext (const char *__msgid1, const char *__msgid2, - unsigned long int __n) +static inline +_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2) +char *ngettext (const char *__msgid1, const char *__msgid2, + unsigned long int __n) { return libintl_ngettext (__msgid1, __msgid2, __n); } @@ -203,8 +210,10 @@ extern char *ngettext (const char *__msgid1, const char *__msgid2, extern char *libintl_dngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n) _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); -static inline char *dngettext (const char *__domainname, const char *__msgid1, - const char *__msgid2, unsigned long int __n) +static inline +_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3) +char *dngettext (const char *__domainname, const char *__msgid1, + const char *__msgid2, unsigned long int __n) { return libintl_dngettext (__domainname, __msgid1, __msgid2, __n); } @@ -226,9 +235,11 @@ extern char *libintl_dcngettext (const char *__domainname, const char *__msgid1, const char *__msgid2, unsigned long int __n, int __category) _INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3); -static inline char *dcngettext (const char *__domainname, - const char *__msgid1, const char *__msgid2, - unsigned long int __n, int __category) +static inline +_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3) +char *dcngettext (const char *__domainname, + const char *__msgid1, const char *__msgid2, + unsigned long int __n, int __category) { return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category); } -- 2.47.3