[systemd-devel] [PATCH] Add more _printf_'s for format-nonliterals

Thomas H.P. Andersen phomes at gmail.com
Sat Dec 14 16:42:02 PST 2013


On Sat, Dec 14, 2013 at 5:31 PM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:
> On Sat, Dec 14, 2013 at 01:32:35PM +0100, Thomas H.P. Andersen wrote:
>> From: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
>>
>> Clang is a bit more strict wrt format-nonliterals:
>> http://clang.llvm.org/docs/LanguageExtensions.html#format-string-checking
>>
>> Adding these extra printf attributes also makes gcc able to find more
>> problems. E.g. this patch uncovers a format issue in udev-builtin-path_id.c
>>
>> Some parts looked intetional about breaking the format-nonliteral check.
>> I added some supression for warnings there.
> Looks OK. But I don't see the fix for udev-builtin-path_id.c?
Thanks, pushed.

This patch only adds warnings for the issue in udev-builtin-path_id.c.
I just wanted to point out that this also has a benefit with gcc. The
issue in udev-builtin-path_id.c still needs to be fixed :)


More information about the systemd-devel mailing list