From: Christian Göttsche Date: Thu, 1 Mar 2018 15:26:18 +0000 (+0100) Subject: fix clang -Wsign-conversion X-Git-Tag: v1.18~4^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c691d422e72cf4c4a64a6b1208c5c61f37de205;p=vnstat fix clang -Wsign-conversion src/ifinfo.c:329:31: error: implicit conversion changes signedness: 'int32_t' (aka 'int') to 'unsigned long' [-Werror,-Wsign-conversion] if (data.btime < (btime-cfg.bvar)) { --- diff --git a/src/ifinfo.c b/src/ifinfo.c index 8565307..0424436 100644 --- a/src/ifinfo.c +++ b/src/ifinfo.c @@ -326,7 +326,7 @@ void parseifinfo(int newdb) /* btime in /proc/stat seems to vary ±1 second so we use btime-BVAR just to be safe */ /* the variation is also slightly different between various kernels... */ - if (data.btime < (btime-cfg.bvar)) { + if (data.btime < (btime-(unsigned)cfg.bvar)) { data.currx=0; data.curtx=0; if (debug)