From 04856ad0761dc073fe5e45804054ff3610560fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Heusipp?= Date: Tue, 3 Sep 2024 06:54:22 +0000 Subject: [PATCH] [Fix] Try a different work-around for cppcheck 2.15.0. See r21562. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@21570 56274372-70c3-4bfc-bfc3-4c3a0b034d27 --- Makefile | 1 + build/cppcheck/glibc-workarounds.cfg | 5 +++++ openmpt123/openmpt123.cpp | 4 +--- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 build/cppcheck/glibc-workarounds.cfg diff --git a/Makefile b/Makefile index 6676752d78..b8586f25f9 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/build/cppcheck/glibc-workarounds.cfg b/build/cppcheck/glibc-workarounds.cfg new file mode 100644 index 0000000000..863ebfadc8 --- /dev/null +++ b/build/cppcheck/glibc-workarounds.cfg @@ -0,0 +1,5 @@ + + + + + diff --git a/openmpt123/openmpt123.cpp b/openmpt123/openmpt123.cpp index 646adaf9d4..b6ec51a2cb 100644 --- a/openmpt123/openmpt123.cpp +++ b/openmpt123/openmpt123.cpp @@ -77,9 +77,7 @@ static const char * const license = #include #include -#if defined(CPPCHECK) -// cppcheck 2.15.0 gets confused by linux/glibc headers -#elif MPT_OS_DJGPP +#if MPT_OS_DJGPP #include #include #include