warnings from clang on ARM (FreeBSD on Raspberry Pi)
Hal Murray
hmurray at megapathdsl.net
Mon Mar 14 08:36:28 UTC 2016
Eric: Would you please take a look at the second one. It's a real bug. You
removed the 2 lines that setup tvlast on Oct 8. Were you trying to move them
out of the "time-critical path"? (and forgot to put them back in)
I haven't investigated the others.
[ 6/121] Compiling libisc/netaddr.c
../../libisc/netaddr.c:145:3: warning: variable 'i' is incremented both in
the loop header and in the loop body [-Wfor-loop-analysis]
i++;
^
../../libisc/netaddr.c:142:22: note: incremented here
for (; i < ipbytes; i++) {
^
1 warning generated.
----------
[ 62/121] Compiling libntp/systime.c
../../libntp/systime.c:451:37: warning: variable 'tvlast' is uninitialized
when used here [-Wuninitialized]
tvdiff = abs_tval(sub_tval(timetv, tvlast));
^~~~~~
../../libntp/systime.c:351:2: note: variable 'tvlast' is declared here
struct timeval timetv, tvlast, tvdiff;
^
1 warning generated.
----------
[151/186] Compiling tests/libntp/sfptostr.c
../../tests/libntp/sfptostr.c:31:19: warning: shifting a negative signed
value is undefined [-Wshift-negative-value]
s_fp test = -200 << 16; // exact -200.000000
~~~~ ^
../../tests/libntp/sfptostr.c:45:20: warning: shifting a negative signed
value is undefined [-Wshift-negative-value]
s_fp test = (-200 << 16) - (1 << 15); // -200 - 0.5
~~~~ ^
../../tests/libntp/sfptostr.c:59:20: warning: shifting a negative signed
value is undefined [-Wshift-negative-value]
s_fp test = (-200 << 16) + (1 << 14)*3; // -200 + 0.75
~~~~ ^
3 warnings generated.
--
These are my opinions. I hate spam.
More information about the devel
mailing list