1 /* Currently the warning only fires at -O0
2 (needs to inline the call without optimizing the
3 implicit default of the switch). */
5 /* { dg-additional-options "-O0" } */
7 typedef __SIZE_TYPE__ size_t;
8 int snprintf(char *str, size_t size, const char *format, ...);
15 static void __analyzer_vreportf(enum usage_kind kind)
20 switch (kind) { /* { dg-message "following 'default:' branch" } */
29 if (kind == USAGE_BUG)
30 snprintf(buf, sizeof(buf), "%s%s:%d: ", pfx, "file", 123);
32 snprintf(buf, sizeof(buf), "%s", pfx); /* { dg-warning "uninitialized" } */
37 __analyzer_vreportf(42);