From: Vadim Zeitlin Date: Sun, 26 Sep 2010 22:11:16 +0000 (+0000) Subject: Initialize wxDateTime::Tm::yday in the ctor. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/fdb44eb24f06c828df8c0e88b1d77272a397f41e Initialize wxDateTime::Tm::yday in the ctor. 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 --- diff --git a/src/common/datetime.cpp b/src/common/datetime.cpp index d6e965cb09..eecee09de4 100644 --- a/src/common/datetime.cpp +++ b/src/common/datetime.cpp @@ -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; }