From: <sv...@op...> - 2024-09-03 06:54:35
|
Author: manx Date: Tue Sep 3 08:54:22 2024 New Revision: 21570 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21570 Log: [Fix] Try a different work-around for cppcheck 2.15.0. See r21562. Added: trunk/OpenMPT/build/cppcheck/glibc-workarounds.cfg Modified: trunk/OpenMPT/Makefile trunk/OpenMPT/openmpt123/openmpt123.cpp Modified: trunk/OpenMPT/Makefile ============================================================================== --- trunk/OpenMPT/Makefile Sun Sep 1 15:17:16 2024 (r21569) +++ trunk/OpenMPT/Makefile Tue Sep 3 08:54:22 2024 (r21570) @@ -1064,6 +1064,7 @@ #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 Added: trunk/OpenMPT/build/cppcheck/glibc-workarounds.cfg ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/OpenMPT/build/cppcheck/glibc-workarounds.cfg Tue Sep 3 08:54:22 2024 (r21570) @@ -0,0 +1,5 @@ +<?xml version="1.0"?> +<def format="2"> + <define name="__BEGIN_DECLS" value="extern "C" {"/> + <define name="__END_DECLS" value="}"/> +</def> Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp ============================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp Sun Sep 1 15:17:16 2024 (r21569) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp Tue Sep 3 08:54:22 2024 (r21570) @@ -77,9 +77,7 @@ #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> |