From fc9d41fad3a8cd7d2917f2f835daf6a73dd32729 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 12 Nov 2017 17:07:35 +0100 Subject: [PATCH] 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. --- src/unix/dlunix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 )