http://llvm.org/bugs/show_bug.cgi?id=19725
Bug ID: 19725
Summary: False positive: garbage array value
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Example code:
void f(const unsigned char n) {
int buf[2][4] = {{0,0,0,0},{0,0,0,0}};
unsigned char j,k,l,x;
for (l = n - 1; l >= 1; l--)
x = 0;
for (j = n - 1; j >= 1; j--) {
for (k = 0; k <= j - 1; k++)
x = buf[k][j];
}
}
I get this false positive:
clang-uninit-fp.c:12:15: warning: Assigned value is garbage or undefined
x = buf[k][j];
But as far as I can tell, buf data is completely initialized.
--
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