diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2012-03-30 17:42:27 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2012-03-30 18:58:46 +0000 |
commit | 02b3efcb7509841871038d89406225d1aaf41684 (patch) | |
tree | 5a488660af3c381c727b31e0e3f88ec8854ac086 /tests/rtc-test.c | |
parent | 6b7cff76e0545b831542bbbdcf3fa2e4f260fbfe (diff) |
qtest: avoid a warning with RTC test
Avoid this warning on OpenBSD:
CC tests/rtc-test.o
/src/qemu/tests/rtc-test.c: In function 'check_time':
/src/qemu/tests/rtc-test.c:171: warning: format '%ld' expects type 'long int', but argument 2 has type 'time_t'
/src/qemu/tests/rtc-test.c:173: warning: format '%ld' expects type 'long int', but argument 2 has type 'time_t'
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'tests/rtc-test.c')
-rw-r--r-- | tests/rtc-test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/rtc-test.c b/tests/rtc-test.c index c32b36a01b..983a980bab 100644 --- a/tests/rtc-test.c +++ b/tests/rtc-test.c @@ -161,12 +161,12 @@ static void check_time(int wiggle) } if (!(tm_cmp(&start, datep) <= 0 && tm_cmp(datep, &end) <= 0)) { - time_t t, s; + long t, s; start.tm_isdst = datep->tm_isdst; - t = mktime(datep); - s = mktime(&start); + t = (long)mktime(datep); + s = (long)mktime(&start); if (t < s) { g_test_message("RTC is %ld second(s) behind wall-clock\n", (s - t)); } else { |