Merge branch 'extra-warn-fixes'
Fix a few harmless warnings given with -Wextra.
This commit is contained in:
@@ -147,6 +147,9 @@ public:
|
|||||||
// backwards compatibility and also because wxGTK has it we could start
|
// backwards compatibility and also because wxGTK has it we could start
|
||||||
// using it for the same purpose in wxX11 too some day.
|
// using it for the same purpose in wxX11 too some day.
|
||||||
virtual void *GetXVisualInfo()
|
virtual void *GetXVisualInfo()
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
wxOVERRIDE
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
return wxGLCanvasX11::GetDefaultXVisualInfo();
|
return wxGLCanvasX11::GetDefaultXVisualInfo();
|
||||||
}
|
}
|
||||||
|
@@ -58,7 +58,7 @@ wx_gdk_screen_get_monitor_workarea(GdkScreen* screen, int monitor, GdkRectangle*
|
|||||||
if (GDK_IS_X11_SCREEN(screen))
|
if (GDK_IS_X11_SCREEN(screen))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
GdkRectangle rect = { 0 };
|
GdkRectangle rect = { 0, 0, 0, 0 };
|
||||||
wxGetWorkAreaX11(GDK_SCREEN_XSCREEN(screen),
|
wxGetWorkAreaX11(GDK_SCREEN_XSCREEN(screen),
|
||||||
rect.x, rect.y, rect.width, rect.height);
|
rect.x, rect.y, rect.width, rect.height);
|
||||||
// in case _NET_WORKAREA result is too large
|
// in case _NET_WORKAREA result is too large
|
||||||
|
@@ -285,7 +285,7 @@ wxDynamicLibraryDetailsArray wxDynamicLibrary::ListLoaded()
|
|||||||
void* wxDynamicLibrary::GetModuleFromAddress(const void* addr, wxString* path)
|
void* wxDynamicLibrary::GetModuleFromAddress(const void* addr, wxString* path)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_DLADDR
|
#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*.
|
// At least under Solaris dladdr() takes non-const void*.
|
||||||
if ( dladdr(const_cast<void*>(addr), &di) == 0 )
|
if ( dladdr(const_cast<void*>(addr), &di) == 0 )
|
||||||
|
@@ -235,6 +235,11 @@ private:
|
|||||||
// helper function to make changing the code later simpler.
|
// helper function to make changing the code later simpler.
|
||||||
static SecretSchema* GetSchema()
|
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 =
|
static SecretSchema s_schema =
|
||||||
{
|
{
|
||||||
"org.freedesktop.Secret.Generic",
|
"org.freedesktop.Secret.Generic",
|
||||||
@@ -246,6 +251,8 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
wxGCC_WARNING_RESTORE(missing-field-initializers)
|
||||||
|
|
||||||
return &s_schema;
|
return &s_schema;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user