❦ 28 mai 2014 22:59 +0200, Willy Tarreau <w...@1wt.eu> :

>> When compiling with  -Werror=format-security (which is a common settings
>> on a Debian-based distribution), we get:
>> 
>> src/dumpstats.c:3059:4: error: format not a string literal and no format 
>> arguments [-Werror=format-security]
>>     chunk_appendf(&trash, srv_hlt_st[1]); /* DOWN (agent) */
>>     ^
>> 
>> srv_hlt_st[1] is "DOWN %s/%s", so this is not even a false positive. I
>> suppose this should be srv_hlt_st[0] but then it's better to just write
>> "DOWN" (since it avoids the warning).
>
> Huh, no, here it's "DOWN (agent)". We don't even have "%s", the only possible
> arguments are %d. Could you please double-check ? Maybe you had local changes,
> I don't know, but I'm a bit confused.

You are right, I was looking at the wrong place in dumpstats.c. So, no
bug, but the compiler is still not happy. What about  providing an
additional argument to chunk_appendf to let know that this is handled correctly?
-- 
 /* Identify the flock of penguins.  */
        2.2.16 /usr/src/linux/arch/alpha/kernel/setup.c

Reply via email to