From 1d1491964946377ee4f2f4c2e5e8fa0d49fc676a Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 21 Feb 2018 12:20:56 +0100 Subject: [PATCH] wxwidgets: Fix syntax checking errors and warning (#1093) wxDebugContext is only defined if wxUSE_DEBUG_CONTEXT is 1, so otherwise just skip it for syntax checking because it will fail. Change wxT to wxT_2 and add wxT_2 to the config to remove a warning during syntax check and be more compatible with newer/older wxwidgets versions. Be more precise when replacing function like macros, fix redundant macro definition for "_". --- cfg/wxwidgets.cfg | 18 +++++++++--------- test/cfg/wxwidgets.cpp | 4 +++- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/cfg/wxwidgets.cfg b/cfg/wxwidgets.cfg index 1a60d3d7e..bd5d37a47 100644 --- a/cfg/wxwidgets.cfg +++ b/cfg/wxwidgets.cfg @@ -2,19 +2,22 @@ - + + + + - + - + - + - - + + @@ -1356,9 +1359,6 @@ - - - diff --git a/test/cfg/wxwidgets.cpp b/test/cfg/wxwidgets.cpp index cc0932417..e1028c237 100644 --- a/test/cfg/wxwidgets.cpp +++ b/test/cfg/wxwidgets.cpp @@ -123,18 +123,20 @@ void deprecatedFunctions(wxApp &a, // cppcheck-suppress SetTextIndentCalled comboCtrl.SetTextIndent(0); +#if wxUSE_DEBUG_CONTEXT==1 // cppcheck-suppress GetLevelCalled // cppcheck-suppress ignoredReturnValue wxDebugContext::GetLevel(); // cppcheck-suppress SetLevelCalled wxDebugContext::SetLevel(42); +#endif // cppcheck-suppress wxDos2UnixFilenameCalled wxDos2UnixFilename(path); // cppcheck-suppress wxFileNameFromPathCalled // cppcheck-suppress ignoredReturnValue - wxFileNameFromPath(wxT("../test.c")); + wxFileNameFromPath(wxT_2("../test.c")); #endif #if defined(__WXMSW__) || defined(__WXGTK__)