]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix spurious g++ warning about possibly uninitialized variable use.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 May 2013 20:34:37 +0000 (20:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 May 2013 20:34:37 +0000 (20:34 +0000)
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

src/generic/timectrlg.cpp

index d649cd885c5228cc876c89289877b4df5121fcfc..b040ee9beb03dd382d13fd48172aee485958f2fb 100644 (file)
@@ -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 )
             {