Re: [PATCH 45/72] libmultipath: fix -Wsign-compare warnings with snprintf()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2019-10-12 14:28, Martin Wilck wrote:
> -	if (snprintf(buf, bufsiz, "%s%s%d", mapname, delim, part) >= bufsiz)
> +	if (snprintf(buf, bufsiz, "%s%s%d", mapname, delim, part)
> +	    >= (int)bufsiz)
>  		return 0;

Please don't insert casts like this. I think enabling -Wsign-compare is
wrong because it makes the source code ugly.

Thank,

Bart.

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux