bug-wget
[Top][All Lists]
Advanced

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

Re: Warning in http.c


From: Tim Rühsen
Subject: Re: Warning in http.c
Date: Sat, 22 Feb 2020 08:48:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

Thanks, fixed and pushed.

Regards, Tim

On 22.02.20 00:04, Gisle Vanem wrote:
> Hi list.
> 
> Just built Wget (master) using clang-cl and noticed this important
> warning:
>   http.c(874,11): warning:
>   ordered comparison between pointer and integer ('size_t' (aka
> 'unsigned int') and 'char *')
>    if (len < buf)
>         ~~~ ^ ~~~
> 
> For the line:
>   if (len < buf)
>     copy = buf;
> 
> (which should always be true).
> 
> Surely it should read:
>   if (len < sizeof(buf))
>     copy = buf;
> 
> 

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]