Compiler warnings
From FreeBSD 11.0-CURRENT on a Pi-2
FreeBSD clang version 3.8.0 (tags/RELEASE_380/final 262564) (based on LLVM 3.8.0) Target: armv6--freebsd11.0-gnueabi Thread model: posix InstalledDir: /usr/bin
../../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++) {
../../tests/libntp/sfptostr.c: In function ‘TEST_sfptostr_NegativeInteger_’:
../../tests/libntp/sfptostr.c:31:19: warning: left shift of negative value [-Wshift-negative-value]
s_fp test = -200 << 16; // exact -200.000000
^~
../../tests/libntp/sfptostr.c: In function ‘TEST_sfptostr_NegativeIntegerNegativeFraction_’:
../../tests/libntp/sfptostr.c:45:20: warning: left shift of negative value [-Wshift-negative-value]
s_fp test = (-200 << 16) - (1 << 15); // -200 - 0.5
^~
../../tests/libntp/sfptostr.c: In function ‘TEST_sfptostr_NegativeIntegerPositiveFraction_’:
../../tests/libntp/sfptostr.c:59:20: warning: left shift of negative value [-Wshift-negative-value]
s_fp test = (-200 << 16) + (1 << 14)*3; // -200 + 0.75
^~
The negative shifts are also noticed by gcc on Fedora 24 Alpha
gcc (GCC) 6.1.1 20160510 (Red Hat 6.1.1-2)