Skip to content

Commit

Permalink
[Fix] Try a different work-around for cppcheck 2.15.0. See r21562.
Browse files Browse the repository at this point in the history
git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@21570 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
manxorist committed Sep 3, 2024
1 parent 6c47b0e commit 04856ad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,7 @@ else
#CPPCHECK_FLAGS += --std=c++20
CPPCHECK_FLAGS += --std=c++17
endif
CPPCHECK_FLAGS += --library=build/cppcheck/glibc-workarounds.cfg
CPPCHECK_FLAGS += --quiet
CPPCHECK_FLAGS += --enable=warning --inline-suppr --template='{file}:{line}: warning: {severity}: {message} [{id}]'
CPPCHECK_FLAGS += --check-level=exhaustive
Expand Down
5 changes: 5 additions & 0 deletions build/cppcheck/glibc-workarounds.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0"?>
<def format="2">
<define name="__BEGIN_DECLS" value="extern &quot;C&quot; {"/>
<define name="__END_DECLS" value="}"/>
</def>
4 changes: 1 addition & 3 deletions openmpt123/openmpt123.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ static const char * const license =
#include <cstdlib>
#include <cstring>

#if defined(CPPCHECK)
// cppcheck 2.15.0 gets confused by linux/glibc headers
#elif MPT_OS_DJGPP
#if MPT_OS_DJGPP
#include <conio.h>
#include <crt0.h>
#include <dpmi.h>
Expand Down

0 comments on commit 04856ad

Please sign in to comment.