I checked it.
It is not a CB issue, it seems it is an issue in cppcheck it self.
This is the result of calling cppcheck manually on the command line :
ldco@linux-jyub:~/Projects/TryOuts/Test_CppCheck/CppCheck/CppCheck/prj> cppcheck --verbose --all --style ../../src/test.cpp
Checking ../../src/test.cpp...
[src/test.cpp:7]: (style) Unused variable: ReturnValue
ldco@linux-jyub:~/Projects/TryOuts/Test_CppCheck/CppCheck/CppCheck/prj>
As you can see : cppcheck is giving back an incorrect path : [src/test.cpp:7]
Similar when we go even one level deeper :
ldco@linux-jyub:~/Projects/TryOuts/Test_CppCheck/CppCheck/CppCheck/prj/CppCheck> cppcheck --verbose --all --style ../../../src/test.cpp
Checking ../../../src/test.cpp...
[../src/test.cpp:7]: (style) Unused variable: ReturnValue
ldco@linux-jyub:~/Projects/TryOuts/Test_CppCheck/CppCheck/CppCheck/prj/CppCheck>
Basically it boils down to : when the directory where cppcheck is invoked is at a deeper level then the sources to check, things start to go wrong.
The first 2 cases in your example zip file were 1 level higher, or at the same level
ldco@linux-jyub:~/Projects/TryOuts/Test_CppCheck/CppCheck> cppcheck --verbose --all --style ./src/test.cpp
Checking ./src/test.cpp...
[./src/test.cpp:7]: (style) Unused variable: ReturnValue
ldco@linux-jyub:~/Projects/TryOuts/Test_CppCheck/CppCheck/CppCheck> cppcheck --verbose --all --style ../src/test.cpp
Checking ../src/test.cpp...
[../src/test.cpp:7]: (style) Unused variable: ReturnValue
created a bug report for it with cppcheck :
https://sourceforge.net/apps/trac/cppcheck/ticket/2059