http://llvm.org/bugs/show_bug.cgi?id=4172
Summary: false positive: Branch condition evaluates to an
uninitialized value
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
scan-build gcc -Wall -O3 tst.c
produce
ANALYZE: tst.c foo
tst.c:15:5: warning: Branch condition evaluates to an uninitialized value.
if(k==0)
^ ~
1 diagnostic generated.
scan-build: 1 bugs found.
I use rev. #71157
#pr -n tst.c
1 struct blob {
2 int n;
3 void *p;
4 } B;
5
6 extern void bar(struct blob*);
7
8 int foo(void)
9 {
10 int k;
11 B.n = sizeof(k);
12 B.p = (void*) &k;
13 bar(&B);
14
15 if(k==0)
16 return 0;
17 else
18 return 1;
19 }
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs