|
From: | Paul Eggert |
Subject: | Re: Compiler Warning vasnprintf.c (L5107: comparison between signed and unsigned int) |
Date: | Thu, 11 Sep 2014 13:20:08 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 |
On 09/11/2014 01:05 PM, Дилян Палаузов wrote:
vasnprintf.c: In function ‘vasnprintf’:vasnprintf.c:5107:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]if (count < maxlen ^count is int (signed) and maxlen is size_t (<=> unsigned) (lines 4935 and 4936).
Sure, but 'count' is nonnegative, so the comparison is numerically correct and there is no bug here.
As a general rule gnulib doesn't worry about pacifying gcc -Wsign-compare, which issues too many false alarms like this.
[Prev in Thread] | Current Thread | [Next in Thread] |