[LLVMbugs] [Bug 19725] New: False positive: garbage array value
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon May 12 09:27:14 PDT 2014
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: kremenek at apple.com
Reporter: daniel.marjamaki at evidente.se
CC: llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140512/e9bbf3e1/attachment.html>
More information about the llvm-bugs
mailing list