[cfe-dev] Bogus warning
Ted Kremenek
kremenek at apple.com
Tue Dec 18 10:48:34 PST 2007
This is a false positive. Thanks for pointing it out! I will add it
to my queue of things to fix/improve.
On Dec 18, 2007, at 12:38 AM, Nico Weber wrote:
> 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
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list