]> git.kaiwu.me - haproxy.git/commit
BUILD: stats: workaround stupid and bogus -Werror=format-security behaviour
authorWilly Tarreau <w@1wt.eu>
Wed, 28 May 2014 23:04:35 +0000 (01:04 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 28 May 2014 23:07:31 +0000 (01:07 +0200)
commitac497071589e30cd266a6043a57d2627434f5f76
tree8b1b8c68ce23cef94ee9771ab579c9f2392b849a
parentc874653bb45b101f50ea710576c7b47766874d1c
BUILD: stats: workaround stupid and bogus -Werror=format-security behaviour

As reported by Vincent Bernat and Ryan O'Hara, building haproxy with the
option above causes this :

src/dumpstats.c: In function 'stats_dump_sv_stats':
src/dumpstats.c:3059:4: error: format not a string literal and no format arguments [-Werror=format-security]
cc1: some warnings being treated as errors
make: *** [src/dumpstats.o] Error 1

With that option, gcc wants an argument after a string format even when
that string format is a const but not a litteral. It can be anything
invalid, for example an integer when a string is expected, it just
wants something. So feed it with something :-(
src/dumpstats.c