projects
/
grub.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec763ed
)
printf_unit_test: Disable Wformat-truncation on GCC >= 7
author
Vladimir Serbinenko
<phcoder@gmail.com>
Wed, 30 Aug 2017 14:59:25 +0000
(16:59 +0200)
committer
Vladimir Serbinenko
<phcoder@gmail.com>
Wed, 30 Aug 2017 14:59:25 +0000
(16:59 +0200)
We intentionally pass NULL as argument to format, hence disable the warning.
tests/printf_unit_test.c
patch
|
blob
|
history
diff --git
a/tests/printf_unit_test.c
b/tests/printf_unit_test.c
index
d7b12c6
..
098c29f
100644
(file)
--- a/
tests/printf_unit_test.c
+++ b/
tests/printf_unit_test.c
@@
-23,6
+23,10
@@
#define MSG "printf test failed: %s, %s", real, expected
+#if defined(__GNUC__) && __GNUC__ >= 7
+#pragma GCC diagnostic ignored "-Wformat-truncation="
+#endif
+
static void
printf_test (void)
{