[PATCH] Use -Wformat=2 by default for all files.

Mark Wielaard mjw at redhat.com
Thu Jan 30 09:23:14 UTC 2014


On Thu, 2014-01-23 at 01:37 +0100, Mark Wielaard wrote:
> This just makes sure that all format strings are given as literals to
> printf like functions so the compiler can see and check them. Remove
> all no_Wformat, add -Wformat=2 unconditionally to AM_CFLAGS.

On irc Petr pointed out that some lines in src/nm.c looked horribly
involved with this change because the format strings were broken up over
multiple lines. I changed those to just define the format strings on
their own line and use the short macro as the actual format string.

No other changes were made to the patch pushed to master (as attached).

Cheers,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-Wformat-2-by-default-for-all-files.patch
Type: text/x-patch
Size: 17714 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/elfutils-devel/attachments/20140130/5934d9dd/attachment.bin>


More information about the elfutils-devel mailing list