From: Vadim Zeitlin Date: Sun, 12 May 2013 20:34:37 +0000 (+0000) Subject: Fix spurious g++ warning about possibly uninitialized variable use. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5ec34ab09c7f4154ec8f21592dd9e505ed26f542 Fix spurious g++ warning about possibly uninitialized variable use. The variables are actually initialized in all cases if the enum has valid value but the compiler doesn't seem to take this into account, so just initialize them always to avoid the warnings. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/timectrlg.cpp b/src/generic/timectrlg.cpp index d649cd885c..b040ee9beb 100644 --- a/src/generic/timectrlg.cpp +++ b/src/generic/timectrlg.cpp @@ -457,8 +457,8 @@ private: // The first digit simply replaces the existing field contents, // but the second one should be combined with the previous one, // otherwise entering 2-digit numbers would be impossible. - int currentValue wxDUMMY_INITIALIZE(0), - maxValue wxDUMMY_INITIALIZE(0); + int currentValue = 0, + maxValue = 0; switch ( m_currentField ) {