[dm-devel] [PATCH 45/72] libmultipath: fix -Wsign-compare warnings with snprintf()
Bart Van Assche
bvanassche at acm.org
Sat Oct 12 22:59:41 UTC 2019
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.
More information about the dm-devel
mailing list