Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
Subject:
Re: relayd: fix GCC16 warnings
To:
Rafael Sadowski <rafael@sizeofvoid.org>
Cc:
tech@openbsd.org
Date:
Fri, 23 Oct 2026 23:41:47 +0200

Download raw body.

Thread
On Fri, 23 Oct 2026 21:58:19 +0200,
Rafael Sadowski <rafael@sizeofvoid.org> wrote:
> 
> Make GCC16 happy with relayd code
> 
> ca.c:348:50: warning: operand of '?:' changes signedness from 'int' to 'unsigned int' due to unsignedness of other operand [-Wsign-compare]
>   348 |                 cko.cko_tlen = (ret > 0) ? len : -1;
> 
> 
...
> -		cko.cko_tlen = (ret > 0) ? len : -1;
> +		cko.cko_tlen = (ret > 0) ? (int)len : -1;

Not sure that I understand this warning.

len is int, -1 is int, cko_tlen is int.

Why gcc things what something here is unsigned int?

-- 
wbr, Kirill