As a workaround for now, -fsigned-char can be added to CXXFLAGS.
This makes all tests pass also on aarch64, ppc64le and s390x, where char is unsigned by default.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
in the meantime, there are 2 failing tests. In the initially reported bug, it was one [1].
Cppcheck version: 2.12.0
Under Fedora, the failing style tests occur under aarch64, ppc64le and s390x. The following architectures are OK: i686, x86_64.
Output from a current build log (e.g. aarch64) [2]:
Number of tests: 4426Number of todos: 331
Tests failed: 2
/builddir/build/BUILD/cppcheck-2.12.0/test/testcondition.cpp:4501(TestCondition::alwaysTrue): Assertion failed.
Expected:
[test.cpp:6]: (style) Condition 'o[1]=='\0'' is always false\n
Actual:
[test.cpp:4] -> [test.cpp:6]: (style) Condition 'o[1]=='\0'' is always false\n
/builddir/build/BUILD/cppcheck-2.12.0/test/testcondition.cpp:5014(TestCondition::alwaysTrueContainer): Assertion failed.
Expected:
[test.cpp:5]: (style) Condition 'buffer.back()=='\0'' is always false\n
Actual:
[test.cpp:3] -> [test.cpp:5]: (style) Condition 'buffer.back()=='\0'' is always false\n
Best regards
Wolfgang
[1] https://trac.cppcheck.net/ticket/11537[2] https://koji.fedoraproject.org/koji/taskinfo?taskID=105994092
As a workaround for now, -fsigned-char can be added to CXXFLAGS.
This makes all tests pass also on aarch64, ppc64le and s390x, where char is unsigned by default.
Hi,
since 2.18.0 (also in 2.18.2), the test
TestCondition
is failing again on aarch64, ppc64le and s390x, where char is unsigned by default.As a workaround,
-fsigned-char
can be added toCXXFLAGS
.Possibly fixed by https://github.com/danmar/cppcheck/commit/e5efd121ce1f1ae464758697eefc755aa8ab0747
Thanks for the quick reply.
Would you mind adding this fix also to the 2.18.x branch?