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:
@@ -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 ();
|
||||
|
Reference in New Issue
Block a user