[dm-devel] multipath-tools: new clang warning

Hannes Reinecke hare at suse.de
Tue Aug 9 06:54:00 UTC 2016


On 08/06/2016 11:37 PM, Xose Vazquez Perez wrote:
> Hi Hannes,
> 
> If you have a spare moment, could you check this new warning?
> This code was added recently in bc6dd798
> "multipathd: Add 'sysfs' prioritizer"
> 
> Thank you.
> 
> 
> clang -Wunused -Wstrict-prototypes -O2 -g -pipe -Wformat-security -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fPIC -DLIB_STRING=\"lib64\" -DRUN_DIR=\"run\"
> -Werror -I../libmpathcmd -DLIBDM_API_FLUSH -D_GNU_SOURCE -DLIBDM_API_COOKIE -DLIBUDEV_API_RECVBUF -DUSE_SYSTEMD=229 -DLIBDM_API_DEFERRED -c -o discovery.o discovery.c
> discovery.c:513:33: error: comparison of constant 18446744073709551615 with expression of type 'unsigned int' is always false [-Werror,-Wtautological-constant-out-of-range-compare]
>         if (value == eptr || preferred == ULONG_MAX) {
>                              ~~~~~~~~~ ^  ~~~~~~~~~
> 
Ah. Ok.

Will be sending a patch.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare at suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)




More information about the dm-devel mailing list