1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

Eliminate -Wno-format from printf/scanf tests.

This commit is contained in:
Roland McGrath
2014-12-11 13:46:21 -08:00
parent a1edbf3cb8
commit 1c4053db63
9 changed files with 80 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <libc-internal.h>
int
main(int arc, char *argv[])
@@ -15,7 +16,14 @@ main(int arc, char *argv[])
printf("Result of fscanf %%n = %d\n", res);
printf("Scanned format = %d\n", val);
/* We're testing exactly the case the warning is for. */
DIAG_PUSH_NEEDS_COMMENT;
DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wformat-zero-length");
res = fscanf(fp, "");
DIAG_POP_NEEDS_COMMENT;
printf("Result of fscanf \"\" = %d\n", res);
if (res != 0)
abort ();