blizzard of compiler warnings

Eric S. Raymond esr at thyrsus.com
Tue Dec 13 23:20:03 UTC 2016


Hal Murray <hmurray at megapathdsl.net>:
> This is on a 32 bit Fedora.
> 
> [142/166] Compiling tests/libntp/vi64ops.c
> In file included from ../../include/ntp_syslog.h:11:0,
>                  from ../../include/ntp_stdlib.h:17,
>                  from ../../tests/libntp/vi64ops.c:2:
> ../../tests/libntp/vi64ops.c: In function ‘TEST_vi64ops_HiLoVUI64uh_’:
> ../../include/ntp_types.h:55:52: warning: left shift count >= width of type 
> [-Wshift-count-overflow]
>  #define SET32FIRST(n,v) (n) = ((((v) & LAST32MASK) << 32) | ((n) & 
> LAST32MASK))
>                                                     ^
> ../../include/ntp_types.h:61:27: note: in expansion of macro ‘SET32FIRST’
>  #define settime64hiu(n,v) SET32FIRST(n,v)
>                            ^~~~~~~~~~
> ../../tests/libntp/vi64ops.c:16:2: note: in expansion of macro 
> ‘settime64hiu’
>   settime64hiu(exp, 0x01234567);
>   ^~~~~~~~~~~~
> ../../tests/libntp/vi64ops.c: In function ‘TEST_vi64ops_HiLoVUI64ul_’:
> ../../include/ntp_types.h:55:52: warning: left shift count >= width of type 
> [-Wshift-count-overflow]
>  #define SET32FIRST(n,v) (n) = ((((v) & LAST32MASK) << 32) | ((n) & 
> LAST32MASK))
>                                                     ^
> ../../include/ntp_types.h:61:27: note: in expansion of macro ‘SET32FIRST’
>  #define settime64hiu(n,v) SET32FIRST(n,v)
>                            ^~~~~~~~~~
> ../../tests/libntp/vi64ops.c:24:2: note: in expansion of macro 
> ‘settime64hiu’
>   settime64hiu(exp, 0x01234567);
>   ^~~~~~~~~~~~

Some or all of these are fixed now; I responded earlier today to a report
from a 32-bit MIPS build.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>


More information about the devel mailing list