wxwidgets.cfg: Added support for wxAtoi, wxAtol and wxAtof.

This commit is contained in:
orbitcowboy 2018-04-04 21:29:55 +02:00
parent b813a6d407
commit 6e21d5ab84
2 changed files with 44 additions and 1 deletions

View File

@ -1372,6 +1372,36 @@
</arg>
<arg nr="2"/>
</function>
<!-- int wxAtoi(const wxString & str)-->
<function name="wxAtoi">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="int"/>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
</function>
<!-- double wxAtof(const wxString & str)-->
<function name="wxAtof">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="double"/>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
</function>
<!-- long wxAtol(const wxString & str)-->
<function name="wxAtol">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="long"/>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
</function>
<define name="DECLARE_EVENT_TABLE()" value="wxDECLARE_EVENT_TABLE()"/>
<define name="wxDECLARE_EVENT_TABLE()" value="private: static const wxEventTableEntry sm_eventTableEntries[]; protected: const wxEventTable* GetEventTable() const; wxEventHashTable&amp; GetEventHashTable() const; static const wxEventTable sm_eventTable; static wxEventHashTable sm_eventHashTable;"/>
<define name="wxIMPLEMENT_APP(appname)" value="wxIMPLEMENT_WX_THEME_SUPPORT wxIMPLEMENT_APP_NO_THEMES(appname)"/>

View File

@ -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)