hello,
void fun() { struct a *vbuf = NULL; struct b *block; for (int i = 0; i < 2; i++) { vbuf = &video_buf[i]; block = &video_block[i]; break; } if (vbuf == NULL) { return; } block->data = 1; }
gives:
a.c:16:5: error: Uninitialized variable: block [uninitvar] block->data = 1; ^ a.c:12:14: note: Assuming condition is false if (vbuf == NULL) { ^ a.c:16:5: note: Uninitialized variable: block block->data = 1; ^
thanks, jacob
This reproduces for me with head. https://trac.cppcheck.net/ticket/9772 might be related.
Log in to post a comment.
hello,
gives:
thanks, jacob
This reproduces for me with head. https://trac.cppcheck.net/ticket/9772 might be related.