From: Vadim Zeitlin Date: Wed, 6 Aug 2008 22:34:40 +0000 (+0000) Subject: initialize a local variable even if it doesn't really need to be initialized to suppr... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/99749f85a14d6d920eadbdfcd9a925e22f79cb7f?ds=inline initialize a local variable even if it doesn't really need to be initialized to suppress annoying g++ warning in optimized build git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/stringops.cpp b/src/common/stringops.cpp index ae182c6cfa..b4959f846c 100644 --- a/src/common/stringops.cpp +++ b/src/common/stringops.cpp @@ -194,7 +194,7 @@ bool wxStringOperationsUtf8::IsValidUtf8LeadByte(unsigned char c) // code in single place wxUniChar::Utf8CharBuffer wxUniChar::AsUTF8() const { - Utf8CharBuffer buf; + Utf8CharBuffer buf = { "" }; // init to avoid g++ 4.1 warning with -O2 char *out = buf.data; value_type code = GetValue();