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@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct

Reply via email to