]> git.saurik.com Git - wxWidgets.git/commitdiff
Initialize wxDateTime::Tm::yday in the ctor.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 26 Sep 2010 22:11:16 +0000 (22:11 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 26 Sep 2010 22:11:16 +0000 (22:11 +0000)
Set Tm::yday to a fixed value in the ctor as well instead of not initializing
it at all.

This bug actually didn't have any visible consequences as yday is currently a
private member of struct tm and didn't seem to be used anywhere but it at
least avoids MinGW 4.x warnings about possibly uninitialized variable and
might become important in the future if we allow accessing this field.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/datetime.cpp

index d6e965cb094aef87a2b604802d182e38186388b1..eecee09de4bf42f9a70cd2997aabbb82cbc66a03 100644 (file)
@@ -508,8 +508,12 @@ wxDateTime::Tm::Tm()
 {
     year = (wxDateTime_t)wxDateTime::Inv_Year;
     mon = wxDateTime::Inv_Month;
-    mday = 0;
-    hour = min = sec = msec = 0;
+    mday =
+    yday = 0;
+    hour =
+    min =
+    sec =
+    msec = 0;
     wday = wxDateTime::Inv_WeekDay;
 }