Re: FTBFS if "-Werror=format-security" flag is used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 06, 2013 at 08:02:06PM +0100, Kevin Kofler wrote:
> * translatable format strings, e.g.
>   printf(translate("processed %d items"), foo);

Translatable strings are handled just fine.
Try e.g.:

extern int my_printf (void *my_object, const char *my_format, ...)
  __attribute__ ((format (printf, 2, 3)));
extern char *my_dgettext (char *my_domain, const char *my_format)
  __attribute__ ((format_arg (2)));

void *p; char *q;
void
foo ()
{
  my_printf (p, my_dgettext (q, "abcd"));
}

e.g. <libintl.h> already uses the right attributes, so you don't
get errors for this.

	Jakub
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux