Fixed an uninitialized variable in the Toshiba T1x00 code.

This commit is contained in:
OBattler
2020-01-15 01:05:54 +01:00
parent 8928ef3f66
commit 21974c5fc5

View File

@@ -240,6 +240,7 @@ tc8521_time_get(uint8_t *regs, struct tm *tm)
tm->tm_hour = ((nibbles(TC8521_HOUR) % 12) +
(regs[TC8521_HOUR10] & 0x02) ? 12 : 0);
//FIXME: wday
tm->tm_wday = 1; /* Dummy value so it is not uninitialized. */
tm->tm_mday = nibbles(TC8521_DAY);
tm->tm_mon = (nibbles(TC8521_MONTH) - 1);
tm->tm_year = (nibbles(TC8521_YEAR) + 1980);