Hi,
with cppcheck head (bde8b4316ece8fc8d296e30547f79f0eefa6fe91) currently the following new uninitvar FPs occur, could you please check:
Checking /home/user/Desktop/21-05-18.cpp ... /home/user/Desktop/21-05-18.cpp:5:10: error: Uninitialized variable: maxResults [uninitvar] size_t maxResults = :🅰🅱:c::d::ef::MAX; ^ /home/user/Desktop/21-05-18.cpp:11:34: error: Uninitialized variable: dayValid [uninitvar] for (auto& isDayValid : dayValid) ^ /home/user/Desktop/21-05-18.cpp:18:25: error: Uninitialized variable: [ [uninitvar] if (dayValid[days]) ^
The second finding might be counted as correct, although in the context of this code I think it wouldn't have to be fixed. The file is attached.
Thanks, Martin
For the first FP I created https://trac.cppcheck.net/ticket/10281
The other FP was fixed by ca5fab8219d12dbae633904c7bddaf9a941f1bdc
I can confirm, all FPs are fixed. Thanks!
Log in to post a comment.
Hi,
with cppcheck head (bde8b4316ece8fc8d296e30547f79f0eefa6fe91) currently the following new uninitvar FPs occur, could you please check:
Checking /home/user/Desktop/21-05-18.cpp ...
/home/user/Desktop/21-05-18.cpp:5:10: error: Uninitialized variable: maxResults [uninitvar]
size_t maxResults = :🅰🅱:c::d::ef::MAX;
^
/home/user/Desktop/21-05-18.cpp:11:34: error: Uninitialized variable: dayValid [uninitvar]
for (auto& isDayValid : dayValid)
^
/home/user/Desktop/21-05-18.cpp:18:25: error: Uninitialized variable: [ [uninitvar]
if (dayValid[days])
^
The second finding might be counted as correct, although in the context of this code I think it wouldn't have to be fixed.
The file is attached.
Thanks,
Martin
For the first FP I created https://trac.cppcheck.net/ticket/10281
The other FP was fixed by ca5fab8219d12dbae633904c7bddaf9a941f1bdc
I can confirm, all FPs are fixed. Thanks!