From 6e21d5ab841e42b4940b2f589ce98b581c2c47fc Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Wed, 4 Apr 2018 21:29:55 +0200 Subject: [PATCH] wxwidgets.cfg: Added support for wxAtoi, wxAtol and wxAtof. --- cfg/wxwidgets.cfg | 30 ++++++++++++++++++++++++++++++ test/cfg/wxwidgets.cpp | 15 ++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/cfg/wxwidgets.cfg b/cfg/wxwidgets.cfg index fd7e138fe..b09e70291 100644 --- a/cfg/wxwidgets.cfg +++ b/cfg/wxwidgets.cfg @@ -1372,6 +1372,36 @@ + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + diff --git a/test/cfg/wxwidgets.cpp b/test/cfg/wxwidgets.cpp index e04c57d32..a9555cb2a 100644 --- a/test/cfg/wxwidgets.cpp +++ b/test/cfg/wxwidgets.cpp @@ -52,10 +52,16 @@ void nullPointer(void) wxLogMessage((char*)NULL); } -void ignoredReturnValue(void) +void ignoredReturnValue(const wxString &s) { // cppcheck-suppress ignoredReturnValue wxGetCwd(); + // cppcheck-suppress ignoredReturnValue + wxAtoi(s); + // cppcheck-suppress ignoredReturnValue + wxAtol(s); + // cppcheck-suppress ignoredReturnValue + wxAtof(s); } void invalidFunctionArg(void) @@ -74,12 +80,19 @@ void uninitvar(void) wxLogLevel logLevelUninit; char cBufUninit[10]; char *pcUninit; + wxString emptyString; // cppcheck-suppress uninitvar wxLogGeneric(logLevelUninit, "test"); // cppcheck-suppress uninitvar wxLogMessage(cBufUninit); // cppcheck-suppress uninitvar wxLogMessage(pcUninit); + // cppcheck-suppress uninitvar + (void)wxAtoi(emptyString); + // cppcheck-suppress uninitvar + (void)wxAtol(emptyString); + // cppcheck-suppress uninitvar + (void)wxAtof(emptyString); } void uninitvar_SetMenuBar(wxFrame * const framePtr, wxMenuBar * const menuBarPtr)