Re: [PATCH 21/21] config: fix sign comparison warnings

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

 



On Wed, Jul 23, 2025 at 10:38:16AM +0100, Phillip Wood wrote:
> Hi Patrick
> 
> On 17/07/2025 11:49, Patrick Steinhardt wrote:
> > There are a couple of -Wsign-compare warnings in "config.c":
> > 
> >    - `prepare_include_condition_pattern()` is declared to return a signed
> >      int, but it either returns 0 or the index of the last dir separator
> >      in a path.
> 
> That is not correct, the function contains the lines
> 
>               if (!kvi || !kvi->path)
>                         return error(_("relative config include "
>                                        "conditionals must come from
> files"));
> 
> so a negative return value is possible.

Oh dear, I totally missed this one. Good catch, will fix in the next
version of this series. Thanks!

Patrick




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux