Hi, I found an inconsistent behavior in the unreadVariable rule. The following two programs are seamntics equivalent.
However, CppCheck reported an unreadVariable warning in the first program, but no warnings in the second program. So, I think this is an inconsistent behaviour.
Hi, I found an inconsistent behavior in the unreadVariable rule. The following two programs are seamntics equivalent.
However, CppCheck reported an unreadVariable warning in the first program, but no warnings in the second program. So, I think this is an inconsistent behaviour.
The First Program
The Second Program
Version: Cppcheck 2.22 dev
Thanks for reporting, see https://trac.cppcheck.net/ticket/14835