Avoid -Wmissing-field-initializers for Dl_info struct

Rely on the default initialization, this is arguably slightly less
clear, but allows to avoid the warning (which is disabled by default,
but still).

Closes #17997.
This commit is contained in:
Vadim Zeitlin
2017-11-12 17:07:35 +01:00
parent b39d29f433
commit fc9d41fad3

View File

@@ -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<void*>(addr), &di) == 0 )