"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
Re: Pointer sign warnings
To:
gameoftrees@openbsd.org
Date:
Thu, 30 Sep 2021 21:38:12 +0200

Download raw body.

Thread
Christian Weisgerber:

> > It is important to cast to unsigned char before assigning to an int
> > or passing to a function that expects an int.  Otherwise, a signed
> > char > 127 becomes a negative value when converted to int.
> -snip-
> 
> Right.  I had checked that *buf or *p aren't passed to isfoo(), but
> I missed the assignment to c and subsequent isfoo(c).
> 
> ok naddy

Or maybe not...  Let's see what we decide on OpenBSD tech@.

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de