Re: cast __swapXX in _endian.h to help the compiler

2018-01-12 Thread Joerg Sonnenberger
On Thu, Jan 11, 2018 at 01:53:00PM +1000, David Gwynne wrote: > this silences the warnings when building dhclient. You might want to check if __builtin_bswap16 and friends exist first and prefer to use them directly. Joerg

Re: cast __swapXX in _endian.h to help the compiler

2018-01-11 Thread Mark Kettenis
> Date: Thu, 11 Jan 2018 13:53:00 +1000 > From: David Gwynne > > this silences the warnings when building dhclient. > > according to guenther@, the c standard says ternary operators are > subject to type promotion rules, ie, it ends up being at least an > int. this adds

cast __swapXX in _endian.h to help the compiler

2018-01-10 Thread David Gwynne
this silences the warnings when building dhclient. according to guenther@, the c standard says ternary operators are subject to type promotion rules, ie, it ends up being at least an int. this adds explicit casts to the expected type, which makes printf happier when you tell it that it's a %hu