Subject: Re: [PATCH v2 1/8] string-list: fix sign compare warnings for loop iterator

From: Patrick Steinhardt <[email-masked]>
Date: Mon, 19 May 2025 09:17:47 +0200

On Sun, May 18, 2025 at 11:56:59PM +0800, shejialuo wrote:
> In "string-list.c", there are six warnings which are emitted by
> "Wsign-compare". And five warnings are caused by the loop iterator type
> mismatch. Let's fix these five warnings by changing the `int` type to
> `size_t` type of the loop iterator.

This naturally causes the question what the 6th warning is, and why it's
not fixed in this commit. The answer is that the last one is more
complex and handled by subsequent patches, which you should probably
point out here. E.g.:

    There are a couple of "-Wsign-compare" warnings in "string-list.c".
    Fix trivial ones that result from a mismatched loop iterator type.

    There is a single warning left after these fixes. This warning needs
    a bit more care and is thus handled in subsequent commits.

> Signed-off-by: shejialuo <[email-masked]>
> ---
>  string-list.c | 22 ++++++++++------------
>  1 file changed, 10 insertions(+), 12 deletions(-)

All of these look obviously good to me, thanks!

Patrick