diff options
author | Roland McGrath <roland@hack.frob.com> | 2014-12-11 13:46:21 -0800 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2014-12-11 13:47:44 -0800 |
commit | 1c4053db63e2a3470ed8ace2ddd9636f9a6e135c (patch) | |
tree | 9ea23fa846a90b210e9d9447f08f390153f4132b /stdio-common/scanf7.c | |
parent | a1edbf3cb8095699794d6601446c0f18cfa265a8 (diff) | |
download | glibc-1c4053db63e2a3470ed8ace2ddd9636f9a6e135c.tar glibc-1c4053db63e2a3470ed8ace2ddd9636f9a6e135c.tar.gz glibc-1c4053db63e2a3470ed8ace2ddd9636f9a6e135c.tar.bz2 glibc-1c4053db63e2a3470ed8ace2ddd9636f9a6e135c.zip |
Eliminate -Wno-format from printf/scanf tests.
Diffstat (limited to 'stdio-common/scanf7.c')
-rw-r--r-- | stdio-common/scanf7.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/stdio-common/scanf7.c b/stdio-common/scanf7.c index c746e47666..53ddf4cb09 100644 --- a/stdio-common/scanf7.c +++ b/stdio-common/scanf7.c @@ -1,5 +1,6 @@ #include <stdio.h> #include <stdlib.h> +#include <libc-internal.h> int main (int argc, char *argv[]) @@ -14,7 +15,16 @@ main (int argc, char *argv[]) abort (); n = -2; + + /* We are testing a corner case of the scanf format string here. */ + DIAG_PUSH_NEEDS_COMMENT; + DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wformat"); + DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wformat-extra-args"); + ret = sscanf ("1000", "%llld", &n); + + DIAG_POP_NEEDS_COMMENT; + printf ("%%llld: ret: %d, n: %Ld\n", ret, n); if (ret > 0 || n >= 0L) abort (); |