Debian Codegraph @

gcc/testsuite/gcc.dg/plugin/diagnostic-test-metadata.c

raw
1 /* { dg-do compile } */
2
3 extern char *gets (char *s);
4
5 void test_cwe (void)
6 {
7 char buf[1024];
8 gets (buf); /* { dg-warning "never use 'gets' \\\[CWE-242\\\] \\\[STR34-C\\\]" } */
9 }