[cfe-dev] Bogus warning
Nico Weber
nicolasweber at gmx.de
Tue Dec 18 00:38:40 PST 2007
Hi,
this looks like a bug:
s0539:src nico$ cat test.c
#include "stdio.h"
int main() {
char buf[1];
sprintf(buf, 1 ? "" : "");
}
s0539:src nico$ ./clang test.c
running "/Users/nico/src/llvm-svn/Debug/bin/clang -fsyntax-only test.c"
test.c:5:16: warning: format string is not a string literal
(potentially insecure)
sprintf(buf, 1 ? "" : "");
~~~~~~~ ^
1 diagnostic generated.
Nico
More information about the cfe-dev
mailing list