Skip to content

Commit

Permalink
Merged revision(s) 20627 from trunk/OpenMPT:
Browse files Browse the repository at this point in the history
[Mod] build: cppcheck: Enable --check-level=exhaustive. The performance cost is around ~10%.
........


git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.31@20628 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
manxorist committed Apr 21, 2024
1 parent 0c8965b commit 314aa42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,7 @@ CPPCHECK_FLAGS += -j $(NUMTHREADS)
CPPCHECK_FLAGS += --std=c11 --std=c++17
CPPCHECK_FLAGS += --quiet
CPPCHECK_FLAGS += --enable=warning --inline-suppr --template='{file}:{line}: warning: {severity}: {message} [{id}]'
CPPCHECL_FLAGS += --check-level=exhaustive
CPPCHECK_FLAGS += --suppress=missingIncludeSystem
CPPCHECK_FLAGS += --suppress=uninitMemberVar

Expand Down
4 changes: 2 additions & 2 deletions build/auto/cppcheck_openmpt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ NPROC=$(nproc)
echo "Platform: $CPPCHECK_PLATFORM"

echo "Checking config ..."
cppcheck -j $NPROC -DCPPCHECK -DMPT_CPPCHECK_CUSTOM $CPPCHECK_PLATFORM --std=c11 --std=c++17 --library=windows.cfg --library=microsoft_atl.cfg --library=mfc.cfg --library=build/cppcheck/mfc-extras.cfg --library=build/cppcheck/nlohmann-json.cfg --suppressions-list=build/cppcheck/nlohmann-json.suppressions.txt --suppressions-list=build/cppcheck/r8brain.suppressions.txt --enable=warning --inline-suppr --template='{file}:{line}: warning: {severity}: {message} [{id}]' --suppress=missingIncludeSystem --suppress=uninitMemberVar $CPPCHECK_OPTIONS $CPPCHECK_DEFINES $CPPCHECK_INCLUDES --check-config --suppress=unmatchedSuppression $CPPCHECK_FILES
cppcheck -j $NPROC -DCPPCHECK -DMPT_CPPCHECK_CUSTOM $CPPCHECK_PLATFORM --std=c11 --std=c++17 --library=windows.cfg --library=microsoft_atl.cfg --library=mfc.cfg --library=build/cppcheck/mfc-extras.cfg --library=build/cppcheck/nlohmann-json.cfg --suppressions-list=build/cppcheck/nlohmann-json.suppressions.txt --suppressions-list=build/cppcheck/r8brain.suppressions.txt --enable=warning --inline-suppr --template='{file}:{line}: warning: {severity}: {message} [{id}]' --suppress=missingIncludeSystem --suppress=uninitMemberVar $CPPCHECK_OPTIONS $CPPCHECK_DEFINES $CPPCHECK_INCLUDES --check-level=exhaustive --check-config --suppress=unmatchedSuppression $CPPCHECK_FILES
echo "Checking C++ ..."
cppcheck -j $NPROC -DCPPCHECK -DMPT_CPPCHECK_CUSTOM $CPPCHECK_PLATFORM --std=c11 --std=c++17 --library=windows.cfg --library=microsoft_atl.cfg --library=mfc.cfg --library=build/cppcheck/mfc-extras.cfg --library=build/cppcheck/nlohmann-json.cfg --suppressions-list=build/cppcheck/nlohmann-json.suppressions.txt --suppressions-list=build/cppcheck/r8brain.suppressions.txt --enable=warning --inline-suppr --template='{file}:{line}: warning: {severity}: {message} [{id}]' --suppress=missingIncludeSystem --suppress=uninitMemberVar $CPPCHECK_OPTIONS $CPPCHECK_DEFINES $CPPCHECK_INCLUDES $CPPCHECK_FILES
cppcheck -j $NPROC -DCPPCHECK -DMPT_CPPCHECK_CUSTOM $CPPCHECK_PLATFORM --std=c11 --std=c++17 --library=windows.cfg --library=microsoft_atl.cfg --library=mfc.cfg --library=build/cppcheck/mfc-extras.cfg --library=build/cppcheck/nlohmann-json.cfg --suppressions-list=build/cppcheck/nlohmann-json.suppressions.txt --suppressions-list=build/cppcheck/r8brain.suppressions.txt --enable=warning --inline-suppr --template='{file}:{line}: warning: {severity}: {message} [{id}]' --suppress=missingIncludeSystem --suppress=uninitMemberVar $CPPCHECK_OPTIONS $CPPCHECK_DEFINES $CPPCHECK_INCLUDES --check-level=exhaustive $CPPCHECK_FILES

0 comments on commit 314aa42

Please sign in to comment.