diff --git a/include/wx/unix/glx11.h b/include/wx/unix/glx11.h index 50305778c4..a27c470332 100644 --- a/include/wx/unix/glx11.h +++ b/include/wx/unix/glx11.h @@ -147,6 +147,9 @@ public: // backwards compatibility and also because wxGTK has it we could start // using it for the same purpose in wxX11 too some day. virtual void *GetXVisualInfo() +#ifdef __WXGTK20__ + wxOVERRIDE +#endif { return wxGLCanvasX11::GetDefaultXVisualInfo(); } diff --git a/src/gtk/display.cpp b/src/gtk/display.cpp index d6562511b8..db1116820d 100644 --- a/src/gtk/display.cpp +++ b/src/gtk/display.cpp @@ -58,7 +58,7 @@ wx_gdk_screen_get_monitor_workarea(GdkScreen* screen, int monitor, GdkRectangle* if (GDK_IS_X11_SCREEN(screen)) #endif { - GdkRectangle rect = { 0 }; + GdkRectangle rect = { 0, 0, 0, 0 }; wxGetWorkAreaX11(GDK_SCREEN_XSCREEN(screen), rect.x, rect.y, rect.width, rect.height); // in case _NET_WORKAREA result is too large diff --git a/src/unix/dlunix.cpp b/src/unix/dlunix.cpp index 1905c97aca..cf51417a25 100644 --- a/src/unix/dlunix.cpp +++ b/src/unix/dlunix.cpp @@ -285,7 +285,7 @@ wxDynamicLibraryDetailsArray wxDynamicLibrary::ListLoaded() void* wxDynamicLibrary::GetModuleFromAddress(const void* addr, wxString* path) { #ifdef HAVE_DLADDR - Dl_info di = { 0 }; + Dl_info di = { }; // 0 initialize whatever fields the struct has // At least under Solaris dladdr() takes non-const void*. if ( dladdr(const_cast(addr), &di) == 0 ) diff --git a/src/unix/secretstore.cpp b/src/unix/secretstore.cpp index f18d5a0e6d..e72ce36248 100644 --- a/src/unix/secretstore.cpp +++ b/src/unix/secretstore.cpp @@ -235,6 +235,11 @@ private: // helper function to make changing the code later simpler. static SecretSchema* GetSchema() { + // SecretSchema struct has some "reserved" fields in it which we don't + // want to initialize, but this results in this warning if it's + // enabled, so just suppress it here. + wxGCC_WARNING_SUPPRESS(missing-field-initializers) + static SecretSchema s_schema = { "org.freedesktop.Secret.Generic", @@ -246,6 +251,8 @@ private: } }; + wxGCC_WARNING_RESTORE(missing-field-initializers) + return &s_schema; }