summaryrefslogtreecommitdiff
path: root/futility/file_type_rwsig.c
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2020-01-21 15:40:59 -0800
committerCommit Bot <commit-bot@chromium.org>2020-01-25 05:39:33 +0000
commitf57ad98c29072624bf0977ab972201595efd2b38 (patch)
tree975068bb32cfa08a455ee2bb8bd2fcd2272c8afb /futility/file_type_rwsig.c
parent2c41d5e07900efd02e2d4041837669ec2490fe68 (diff)
downloadvboot-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 'futility/file_type_rwsig.c')
-rw-r--r--futility/file_type_rwsig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/futility/file_type_rwsig.c b/futility/file_type_rwsig.c
index c5616e57..bcccb2dd 100644
--- a/futility/file_type_rwsig.c
+++ b/futility/file_type_rwsig.c
@@ -112,7 +112,7 @@ int ft_show_rwsig(const char *name, uint8_t *buf, uint32_t len, void *nuthin)
sig_size = fmaparea->area_size;
- VB2_DEBUG("Looking for signature at %#x (%#x)\n",
+ VB2_DEBUG("Looking for signature at %#tx (%#x)\n",
(uint8_t*)sig - buf, sig_size);
if (VB2_SUCCESS != vb21_verify_signature(sig, sig_size))
@@ -235,7 +235,7 @@ int ft_sign_rwsig(const char *name, uint8_t *buf, uint32_t len, void *nuthin)
sig_size = fmaparea->area_size;
- VB2_DEBUG("Looking for signature at %#x (%#x)\n",
+ VB2_DEBUG("Looking for signature at %#tx (%#x)\n",
(uint8_t*)old_sig - buf, sig_size);
data = fmap_find_by_name(buf, len, fmap, "EC_RW",