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

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

 



On Tue, Dec 10, 2013 at 3:50 PM, Kevin Kofler <kevin.kofler@xxxxxxxxx> wrote:
> drago01 wrote:
>
>> On Tue, Dec 10, 2013 at 3:00 AM, Kevin Kofler <kevin.kofler@xxxxxxxxx>
>> 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@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