]> git.proxmox.com Git - grub2.git/commitdiff
printf_unit_test: Disable Wformat-truncation on GCC >= 7
authorVladimir Serbinenko <phcoder@gmail.com>
Wed, 30 Aug 2017 14:59:25 +0000 (16:59 +0200)
committerVladimir 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

index d7b12c6dbee6e84ace9d9f81d476622194810b26..098c29fd9ce2d28a5b83b74afc0f9e40b7c401ec 100644 (file)
 
 #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)
 {