From e9a836c9dc5f26dc456ff40c6db5fbbbb7f782e2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 6 Jun 2016 00:30:42 +0200 Subject: [PATCH] Work around gcc -Wmissing-field-initializers warning Use wxZeroMemory() instead of just initializing CREDENTIAL struct with 0 (which probably more efficient, but almost certainly insignificantly so). --- src/msw/secretstore.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/msw/secretstore.cpp b/src/msw/secretstore.cpp index 6ce67aa4d1..72293e41ec 100644 --- a/src/msw/secretstore.cpp +++ b/src/msw/secretstore.cpp @@ -31,8 +31,9 @@ // Somewhat surprisingly, wincred.h is not self-contained and relies on some // standard Windows macros being defined without including the headers defining -// them on its own. -#include "wx/msw/wrapwin.h" +// them on its own, so we must include (from our private header) +// before including it. +#include "wx/msw/private.h" #include namespace @@ -65,7 +66,8 @@ public: { const wxString target = MakeTargetName(service, user); - CREDENTIAL cred = { 0 }; + CREDENTIAL cred; + wxZeroMemory(cred); cred.Type = CRED_TYPE_GENERIC; cred.TargetName = const_cast(target.t_str()); cred.UserName = const_cast(user.t_str());