Enable format string warnings for vb2ex_printf()

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()).

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
7 files changed