Debian Codegraph @

gcc/testsuite/gcc.dg/format/ms_sec-1.c

raw
1 /* Test for security warning when non-literal format has no arguments. */
2 /* Origin: Joseph Myers <[email protected]> */
3 /* { dg-do compile { target { *-*-mingw* } } } */
4 /* { dg-options "-std=gnu99 -Wformat -Wformat-security" } */
5
6 #define USE_SYSTEM_FORMATS
7 #include "format.h"
8
9 void
10 foo (char *s)
11 {
12 printf (s); /* { dg-warning "no format arguments" "security warning" } */
13 }