From: Miroslav Lichvar Date: Thu, 21 Aug 2014 12:06:06 +0000 (+0200) Subject: util: fix compiler warning with 32-bit time_t X-Git-Tag: 1.31~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a795b04eeb42d41c079f42d7cb04be460c0b6ff;p=thirdparty%2Fchrony.git util: fix compiler warning with 32-bit time_t --- diff --git a/util.c b/util.c index 5fecd258..08fc0cdc 100644 --- a/util.c +++ b/util.c @@ -550,13 +550,15 @@ UTI_Int64ToTimeval(NTP_int64 *src, void UTI_TimevalNetworkToHost(Timeval *src, struct timeval *dest) { - uint32_t sec_low, sec_high; + uint32_t sec_low; +#ifdef HAVE_LONG_TIME_T + uint32_t sec_high; +#endif dest->tv_usec = ntohl(src->tv_nsec) / 1000; - sec_high = ntohl(src->tv_sec_high); sec_low = ntohl(src->tv_sec_low); - #ifdef HAVE_LONG_TIME_T + sec_high = ntohl(src->tv_sec_high); if (sec_high == TV_NOHIGHSEC) sec_high = 0;