diff --git a/cfg/wxwidgets.cfg b/cfg/wxwidgets.cfg index e14253ee8..8d6b53f50 100644 --- a/cfg/wxwidgets.cfg +++ b/cfg/wxwidgets.cfg @@ -937,6 +937,25 @@ + + + false + + + + + + + + + + + + + + + + diff --git a/test/cfg/wxwidgets.cpp b/test/cfg/wxwidgets.cpp index 9d2e01976..eec87699f 100644 --- a/test/cfg/wxwidgets.cpp +++ b/test/cfg/wxwidgets.cpp @@ -21,6 +21,7 @@ #include #include #include +#include void validCode() { @@ -77,7 +78,26 @@ void nullPointer(const wxString &str) unsigned long long * ulongLongPtr = NULL; // cppcheck-suppress nullPointer (void)str.ToULongLong(ulongLongPtr); +} +void nullPointer_wxSizer_Add(wxSizer &sizer, wxWindow *w) +{ + wxWindow * const ptr = 0; + // cppcheck-suppress nullPointer + sizer.Add(ptr); + // No warning shall be issued for + sizer.Add(w); +} + +void uninitvar_wxSizer_Add(wxSizer &sizer, wxWindow *w,wxObject* userData ) +{ + int uninit; + // cppcheck-suppress uninitvar + sizer.Add(w,uninit); + // cppcheck-suppress uninitvar + sizer.Add(w,4,uninit); + // cppcheck-suppress uninitvar + sizer.Add(w,4,2,uninit,userData); } void ignoredReturnValue(const wxString &s)