Skip to content

Commit

Permalink
wxwidgets.cfg: Added support for wxVersionInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitcowboy committed Mar 17, 2024
1 parent 0a8fdf3 commit 0c40dbd
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 0 deletions.
105 changes: 105 additions & 0 deletions cfg/wxwidgets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<check>wxSize</check>
<check>wxPoint</check>
<check>wxRealPoint</check>
<check>wxVersionInfo</check>
</unusedvar>
<operatorEqVarError>
</operatorEqVarError>
Expand Down Expand Up @@ -17004,4 +17005,108 @@ wxItemKind kind = wxITEM_NORMAL) -->
<arg nr="2" direction="in">
</arg>
</function>
<!-- bool wxVersionInfo::AtLeast( int major, int minor = 0, int micro = 0 ) const -->
<function name="wxVersionInfo::AtLeast">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="bool"/>
<const/>
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2" default="0" direction="in">
<not-uninit/>
</arg>
<arg nr="3" default="0" direction="in">
<not-uninit/>
</arg>
</function>
<!-- const wxString & wxVersionInfo::GetCopyright( void ) const -->
<function name="wxVersionInfo::GetCopyright">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="const wxString &amp;"/>
<use-retval/>
<const/>
</function>
<!-- const wxString & wxVersionInfo::GetDescription( void ) const -->
<function name="wxVersionInfo::GetDescription">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="const wxString &amp;"/>
<use-retval/>
<const/>
</function>
<!-- int wxVersionInfo::GetMajor( void ) const -->
<function name="wxVersionInfo::GetMajor">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="int"/>
<use-retval/>
<const/>
</function>
<!-- int wxVersionInfo::GetMicro( void ) const -->
<function name="wxVersionInfo::GetMicro">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="int"/>
<use-retval/>
<const/>
</function>
<!-- int wxVersionInfo::GetMinor( void ) const -->
<function name="wxVersionInfo::GetMinor">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="int"/>
<use-retval/>
<const/>
</function>
<!-- const wxString & wxVersionInfo::GetName( void ) const -->
<function name="wxVersionInfo::GetName">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="const wxString &amp;"/>
<use-retval/>
<const/>
</function>
<!-- int wxVersionInfo::GetRevision( void ) const -->
<function name="wxVersionInfo::GetRevision">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="int"/>
<use-retval/>
<const/>
</function>
<!-- wxString wxVersionInfo::GetVersionString( void ) const -->
<function name="wxVersionInfo::GetVersionString">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="wxString"/>
<use-retval/>
<const/>
</function>
<!-- bool wxVersionInfo::HasCopyright( void ) const -->
<function name="wxVersionInfo::HasCopyright">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="bool"/>
<use-retval/>
<const/>
</function>
<!-- bool wxVersionInfo::HasDescription( void ) const -->
<function name="wxVersionInfo::HasDescription">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="bool"/>
<use-retval/>
<const/>
</function>
<!-- wxString wxVersionInfo::ToString( void ) const -->
<function name="wxVersionInfo::ToString">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="wxString"/>
<use-retval/>
<const/>
</function>
</def>
19 changes: 19 additions & 0 deletions test/cfg/wxwidgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,25 @@
#include <wx/textctrl.h>
#include <wx/gdicmn.h>
#include <wx/propgrid/property.h>
#include <wx/versioninfo.h>

void unreadVariable_wxVersionInfo(const wxString &name, const int major, const int minor, const int micro, const wxString &description, const wxString &copyright)
{
// cppcheck-suppress unreadVariable
wxVersionInfo a;
// cppcheck-suppress unreadVariable
wxVersionInfo b(name);
// cppcheck-suppress unreadVariable
wxVersionInfo c(name, major);
// cppcheck-suppress unreadVariable
wxVersionInfo d(name, major, minor);
// cppcheck-suppress unreadVariable
wxVersionInfo e(name, major, minor, micro);
// cppcheck-suppress unreadVariable
wxVersionInfo f(name, major, minor, micro, description);
// cppcheck-suppress unreadVariable
wxVersionInfo g(name, major, minor, micro, description, copyright);
}

void unreadVariable_wxSize(const wxSize &s)
{
Expand Down

0 comments on commit 0c40dbd

Please sign in to comment.