Thread (18 messages) 18 messages, 5 authors, 2024-06-13

Re: termios constants should be unsigned

From: Alejandro Colomar <alx@kernel.org>
Date: 2024-06-12 19:01:44
Also in: linux-man

On Wed, Jun 12, 2024 at 01:47:03PM GMT, enh wrote:
hacked these changes into AOSP, and it did break one bit of existing
code that was already working around the sign differences --- this
warning was enabled but the code had a cast to make the _other_ side
of the comparison signed (rather than make this side of the comparison
unsigned).
BTW, that seems to be a bogus way to workaround this; the cast should
have been on the other side.  I'd say whoever maintains that code should
probably fix that to use unsigned types.  These constants are meant to
be 'tcflag_t', so a cast should be to that type, or the type of the
other side of the comparison, but casting to 'int' just for silencing a
waring seems nuts.

This makes me wonder if breaking _those_ users could be a good thing...

-- 
<https://www.alejandro-colomar.es/>

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help