cppcheck d36aa590cdd499d2f41e42c79dec607a91c0edf5
given:
static int func() { int rc; while (true) { rc = func(); break; } return rc; }
yields:
x.c:9:12: error: Uninitialized variable: rc [uninitvar] return rc; ^ x.c:4:12: note: Assuming condition is false while (true) { ^ x.c:9:12: note: Uninitialized variable: rc return rc;
true does not mean anything in C so you need to define it.
true
Log in to post a comment.
cppcheck d36aa590cdd499d2f41e42c79dec607a91c0edf5
given:
yields:
true
does not mean anything in C so you need to define it.Last edit: Daniel Marjamäki 2021-12-25