Re: [PATCH v2 4/4] minmax: remove useless cast in __is_nonneg()
From: Vincent Mailhol
Date: Sat Dec 20 2025 - 05:53:37 EST
On 20/12/2025 at 11:02, David Laight wrote:
> On Fri, 19 Dec 2025 23:39:48 +0100
> Vincent Mailhol <mailhol@xxxxxxxxxx> wrote:
>
>> The function like macro __is_nonneg() casts its argument to (long long)
>> in an attempt to silence -Wtype-limits warnings on unsigned values.
>
> nak.
>
> The cast is needed for pointer types, not for -Wtype-limits.
> which is why the '#if __SIZEOF_POINTER__ == __SIZEOF_LONG_LONG__'
> test is there.
OK. I will remove that fourth patch in v3.
Yours sincerely,
Vincent Mailhol