On Tue, Dec 10, 2013 at 3:50 PM, Kevin Kofler <kevin.kof...@chello.at> wrote:
> drago01 wrote:
>
>> On Tue, Dec 10, 2013 at 3:00 AM, Kevin Kofler <kevin.kof...@chello.at>
>> wrote:
>>> [...] and removes functionality
>>
>> No it does not.
>
> Yes, it does, see my example:
> | 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).
>
> -Werror=format-security removes the functionality of building format strings
> at runtime, and there are legitimate uses for such functionality.

(info gcc) says that format-security only applies to calls "where the
format string is not a string literal _and there are no format
arguments_", which is not the case for the wrapper above.  Is the
documentation incorrect?
     Mirek
-- 
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