diff mbox

[v2,1/2] Makefile: avoid non-literal printf format string warnings

Message ID 1437472726-31907-2-git-send-email-andre.przywara@arm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andre Przywara July 21, 2015, 9:58 a.m. UTC
The clang compiler by default dislikes non-literal format strings
in *printf functions, so it complains about kvm__set_dir() in kvm.c
and about the error reporting functions.
Since a fix is not easy and the code itself is fine (just seems that
the compiler is not smart enough to see that), let's just disable
the warning. Since GCC knows about this option as well (it just
doesn't have it enabled with -Wall), we can unconditionally add this
to the warning options.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 285c482..1534e6f 100644
--- a/Makefile
+++ b/Makefile
@@ -335,6 +335,7 @@  WARNINGS += -Wstrict-prototypes
 WARNINGS += -Wundef
 WARNINGS += -Wvolatile-register-var
 WARNINGS += -Wwrite-strings
+WARNINGS += -Wno-format-nonliteral
 
 CFLAGS	+= $(WARNINGS)