The following command execution fails in Windows cmd if python.exe (but not python3.exe) is in the path: >cppcheck.exe --addon=misra.py dummy.cpp Error message is: 'python3.exe' is not recognized as an internal or external command, operable program or batch file. dummy.cpp:0:0: error: Bailing out from analysis: Checking file failed: Failed to auto detect python [internalError] Tested with 12.2.1 and origin/main SHA-1: 9dd729e9bec3d56daa4cbffdf8fd16aeadb9ec54
Looks like a false positive on the return statement of the global function: class Foo { template <unsigned int i> bool bar() { return true; } }; template <> bool Foo::bar<9>() { return true; } int global() { int bar = 1; // Reusing the name of the template function return bar; } false_positive.cpp:18:12: error: Uninitialized variable: bar < 9 > [uninitvar] return bar; ^
To me this looks like a false positive: int *ptr; void foo(int arr[]) { ptr = &arr[2]; } cppcheck_false_positive.cpp:4:5: error: Non-local variable 'ptr' will use pointer to local variable 'arr'. [danglingLifetime] ptr = &arr[2]; ^