diff options
author | Julius Werner <jwerner@chromium.org> | 2020-01-21 15:40:59 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-25 05:39:33 +0000 |
commit | f57ad98c29072624bf0977ab972201595efd2b38 (patch) | |
tree | 975068bb32cfa08a455ee2bb8bd2fcd2272c8afb /Makefile | |
parent | 2c41d5e07900efd02e2d4041837669ec2490fe68 (diff) | |
download | vboot-f57ad98c29072624bf0977ab972201595efd2b38.tar.gz |
Enable format string warnings for vb2ex_printf()stabilize-12859.B
This patch enables the -Wformat warning and tags vb2ex_printf() with the
appropriate attribute so the compiler recognizes it as a printf variant.
This shows a bunch of (sometimes pretty bad) issues in existing code
that are hereby fixed.
Cannot enable -Wformat-security yet since a lot of code still uses
non-constant format strings and it's unclear whether we can/want to
change that in all circumstances (e.g. stuff like DoError()).
BRANCH=None
BUG=None
TEST=make runtests
Change-Id: I917a4982a97a668a5c0f793f7c771573f2bd3949
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2013857
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -142,7 +142,7 @@ COMMON_FLAGS := -pipe ${WERROR} -Wall -Wstrict-prototypes -Wtype-limits \ -Wundef -Wmissing-prototypes -Wno-trigraphs -Wredundant-decls -Wshadow \ -Wwrite-strings -Wstrict-aliasing -Wdate-time -Wno-unknown-warning \ -Wno-address-of-packed-member -ffunction-sections -fdata-sections \ - -Wimplicit-fallthrough ${DEBUG_FLAGS} + -Wimplicit-fallthrough -Wformat -Wno-format-security ${DEBUG_FLAGS} # Note: FIRMWARE_ARCH is defined by the Chromium OS ebuild. ifeq (${FIRMWARE_ARCH},arm) |