diff options
Diffstat (limited to 'tests/portable')
| -rw-r--r-- | tests/portable/asprintf-t.c | 1 | ||||
| -rw-r--r-- | tests/portable/snprintf-t.c | 4 | 
2 files changed, 4 insertions, 1 deletions
| diff --git a/tests/portable/asprintf-t.c b/tests/portable/asprintf-t.c index c61c14a..e556d95 100644 --- a/tests/portable/asprintf-t.c +++ b/tests/portable/asprintf-t.c @@ -16,6 +16,7 @@   */  #include <config.h> +#include <portable/macros.h>  #include <portable/system.h>  #include <tests/tap/basic.h> diff --git a/tests/portable/snprintf-t.c b/tests/portable/snprintf-t.c index 270d2e1..cc8cf00 100644 --- a/tests/portable/snprintf-t.c +++ b/tests/portable/snprintf-t.c @@ -26,7 +26,9 @@   * Disable the requirement that format strings be literals.  We need variable   * formats for easy testing.   */ -#pragma GCC diagnostic ignored "-Wformat-nonliteral" +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2) || defined(__clang__) +# pragma GCC diagnostic ignored "-Wformat-nonliteral" +#endif  /*   * Intentionally don't add the printf attribute here since we pass a | 
