diff --git a/cfg/wxwidgets.cfg b/cfg/wxwidgets.cfg
index f5f1d9a6d17..2a2dbb791f4 100644
--- a/cfg/wxwidgets.cfg
+++ b/cfg/wxwidgets.cfg
@@ -20,6 +20,8 @@
wxFont
wxFontInfo
wxFontList
+ wxIcon
+ wxImage
wxPen
wxPenList
wxPoint
diff --git a/test/cfg/wxwidgets.cpp b/test/cfg/wxwidgets.cpp
index ca862ad44d1..4f0c00ad74e 100644
--- a/test/cfg/wxwidgets.cpp
+++ b/test/cfg/wxwidgets.cpp
@@ -31,6 +31,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -56,6 +57,30 @@
#include
#include
+void unreadVariable_wxIcon(const wxIcon &icon, const char bits[], const int x, const char *const *ptr)
+{
+ // cppcheck-suppress unusedVariable
+ wxIcon a;
+ // cppcheck-suppress unreadVariable
+ wxIcon b(icon);
+ // cppcheck-suppress unreadVariable
+ wxImage c(bits, x, x);
+ // cppcheck-suppress unreadVariable
+ wxImage d(ptr);
+}
+
+void unreadVariable_wxImage(const wxImage &image, const int x)
+{
+ // cppcheck-suppress unusedVariable
+ wxImage a;
+ // cppcheck-suppress unreadVariable
+ wxImage b(image);
+ // cppcheck-suppress unreadVariable
+ wxImage c(x, x);
+ // cppcheck-suppress unreadVariable
+ wxImage d(x, x, true);
+}
+
void unreadVariable_wxUString(const wxUString &str, const wxChar32 *strPtr)
{
// cppcheck-suppress unusedVariable