From 89f41f98e13eda790d4e83814b69f28eff1c27bc Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 7 Apr 2026 09:25:27 +1000 Subject: Update suppressions for cppcheck 2.20. --- cppcheck.suppress | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) (limited to 'cppcheck.suppress') diff --git a/cppcheck.suppress b/cppcheck.suppress index 812b65277..2f6dd49b5 100644 --- a/cppcheck.suppress +++ b/cppcheck.suppress @@ -1,6 +1,6 @@ // File to suppress cppcheck warnings for files that will not be fixed. // Does not suppress warnings where an additional occurrence of the warning may be of interest. -// Configured for cppcheck 2.15 +// Configured for cppcheck 2.20 // Just a report of how many checkers are run checkersReport @@ -50,11 +50,22 @@ knownConditionTrueFalse:scintilla/src/EditView.cxx // This makes no sense CastIntegerToAddressAtReturn:scintilla\src\DBCS.cxx +// Preprocessor #if with *_CHECK_VERSION(...) *_VERSION_CHECK(...) +syntaxError:scintilla/gtk/Wrappers.h +syntaxError:scintilla/gtk/PlatGTK.cxx +syntaxError:scintilla/gtk/ScintillaGTKAccessible.cxx +syntaxError:scintilla/qt/ScintillaEditBase/PlatQt.cpp +syntaxError:scintilla/qt/ScintillaEditBase/ScintillaEditBase.cpp +syntaxError:scintilla/qt/ScintillaEditBase/ScintillaQt.cpp + // G_DEFINE_TYPE is too complex to pass to cppcheck unknownMacro:scintilla/gtk/PlatGTK.cxx // G_END_DECLS unknownMacro:scintilla/gtk/scintilla-marshal.h +// Marshaling hidden from cppcheck +unusedFunction:scintilla/gtk/scintilla-marshal.c + // Difficult to test accessibility so don't change constParameterPointer:scintilla/gtk/ScintillaGTKAccessible.cxx constVariableReference:scintilla/gtk/ScintillaGTKAccessible.cxx @@ -66,16 +77,48 @@ preprocessorErrorDirective:scintilla/qt/**.cpp // Doesn't understand Qt slots macro unknownMacro:scintilla/qt/ScintillaEditBase/*.h +// Provided for other projects +unusedFunction:scintilla/qt/ScintillaEdit/ScintillaDocument.cpp + +// Provided for other projects +unusedFunction:scintilla/call/ScintillaCall.cxx + +// Don't want to unnecessarily allow const pointers to be made mutable through reinterpret_cast +constParameterPointer:scintilla/call/ScintillaCall.cxx +constParameterPointer:scintilla/src/Editor.cxx +constVariablePointer:scintilla/src/Editor.cxx + // The performance cost of by-value passing is often small and using a reference decreases // code legibility. passedByValue +// For conciseness, the testing code is much sloppier than the library + // Suppress everything in catch.hpp as won't be changing *:scintilla/test/unit/catch.hpp -// Checks for moves move to variables that are not read but the moved from is checked +// unread variables and overwritten without read in tests unreadVariable:scintilla/test/unit/*.cxx + +// Checks for moves move to variables that are not read but the moved from is checked accessMoved:scintilla/test/unit/*.cxx +// 'obviously' true tests are still useful +knownConditionTrueFalse:scintilla/test/unit/*.cxx + +// fields in TEST_CASE could be restricted to SECTION but not interesting +variableScope:scintilla/test/unit/*.cxx + +// overwritten without read in tests +redundantInitialization:scintilla/test/unit/*.cxx +redundantAssignment:scintilla/test/unit/*.cxx +unusedVariable:scintilla/test/unit/*.cxx + +// doesn't understand cppcheck TEST_CASE +syntaxError:scintilla/test/unit/*.cxx + +// doesn't understand cppcheck generated functions +unusedFunction:scintilla/test/unit/*.cxx + // cppcheck fails REQUIRE from Catch comparisonOfFuncReturningBoolError:scintilla/test/unit/*.cxx -- cgit v1.2.3