hwclock: fix compiler warnings [-Wmaybe-uninitialized]
sys-utils/hwclock-rtc.c: In function 'synchronize_to_clock_tick_rtc': sys-utils/hwclock.c:169:28: warning: 'now.tv_usec' may be used uninitialized in this function [-Wmaybe-uninitialized] sys-utils/hwclock-rtc.c:215:24: note: 'now.tv_usec' was declared here sys-utils/hwclock.c:168:28: warning: 'now.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized] sys-utils/hwclock-rtc.c:215:24: note: 'now.tv_sec' was declared here sys-utils/hwclock.c:169:28: warning: 'begin.tv_usec' may be used uninitialized in this function [-Wmaybe-uninitialized] sys-utils/hwclock-rtc.c:215:17: note: 'begin.tv_usec' was declared here sys-utils/hwclock.c:168:28: warning: 'begin.tv_sec' may be used uninitialized in this function [-Wmaybe-uninitialized] sys-utils/hwclock-rtc.c:215:17: note: 'begin.tv_sec' was declared here Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
5d58258d62
commit
cf8c191738
|
@ -212,7 +212,7 @@ static int busywait_for_rtc_clock_tick(const struct hwclock_control *ctl,
|
||||||
/* The time when we were called (and started waiting) */
|
/* The time when we were called (and started waiting) */
|
||||||
struct tm nowtime;
|
struct tm nowtime;
|
||||||
int rc;
|
int rc;
|
||||||
struct timeval begin, now;
|
struct timeval begin = { 0 }, now = { 0 };
|
||||||
|
|
||||||
if (ctl->verbose) {
|
if (ctl->verbose) {
|
||||||
printf("ioctl(%d, RTC_UIE_ON, 0): %s\n",
|
printf("ioctl(%d, RTC_UIE_ON, 0): %s\n",
|
||||||
|
|
Loading…
Reference in New Issue