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

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

 



Przemek Klosowski wrote:
> Given that pretty much all those cases can be solved by either "%s" or
> 
> |   __attribute__((__format__(__printf, 1, 2)));

"pretty much all" maybe, but not all!

See e.g. the examples I have given in the FESCo ticket:
* a printf wrapper for logging which adds a timestamp in front of the
  format string, e.g.
  log("processed %d items", foo);
  which would be printed as
  2013-12-06 19:00:00: processed 123 items
  to some logfile (using vfprintf with a format string like
  "2013-12-06 19:00:00: processed %d items"
  concatenated at runtime).
* translatable format strings, e.g.
  printf(translate("processed %d items"), foo);

        Kevin Kofler

-- 
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