diff options
Diffstat (limited to 'test/Sema/format-strings-scanf.c')
-rw-r--r-- | test/Sema/format-strings-scanf.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Sema/format-strings-scanf.c b/test/Sema/format-strings-scanf.c index 6f6cb10eb3..49c97149a7 100644 --- a/test/Sema/format-strings-scanf.c +++ b/test/Sema/format-strings-scanf.c @@ -33,6 +33,12 @@ void test(const char *s, int *i) { scanf("%*d", i); // // expected-warning{{data argument not used by format string}} scanf("%*d", i); // // expected-warning{{data argument not used by format string}} scanf("%*d%1$d", i); // no-warning + + scanf("%s", (char*)0); // no-warning + scanf("%s", (volatile char*)0); // no-warning + scanf("%s", (signed char*)0); // no-warning + scanf("%s", (unsigned char*)0); // no-warning + scanf("%hhu", (signed char*)0); // no-warning } void bad_length_modifiers(char *s, void *p, wchar_t *ws, long double *ld) { |