From a17a8f667fc04099d9b9760efe97413a06aa70b8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 29 May 2018 13:28:59 +0200 Subject: [PATCH] Use wxZeroMemory() rather than memset() for clearing struct fields This does the same thing but avoids gcc 8 -Wclass-memaccess warning (harmless in this case, but potentially useful elsewhere, so it seems better to work around rather than disable it). --- src/msw/taskbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/taskbar.cpp b/src/msw/taskbar.cpp index 22583439bf..976f5e9197 100644 --- a/src/msw/taskbar.cpp +++ b/src/msw/taskbar.cpp @@ -92,7 +92,7 @@ struct NotifyIconData : public NOTIFYICONDATA { NotifyIconData(WXHWND hwnd) { - memset(this, 0, sizeof(NOTIFYICONDATA)); + wxZeroMemory(*this); // Since Vista there is a new member hBalloonIcon which will be used // if a user specified icon is specified in ShowBalloon(). For XP