Re: avoid compiler warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



According to Herbert Xu on 8/11/2009 3:56 PM:
> On Tue, Aug 11, 2009 at 09:33:43AM -0700, H. Peter Anvin wrote:
>> Herbert... the *type* is int, but the *value* has to be in the range
>> [-1,UCHAR_MAX] or the behavior is undefined in both the C and POSIX
>> standards.
> 
> Good point.  I'll apply the patch.  I'd be very surprised though
> if this was the only instance in which we pass a char along.

I would be surprised, too, but this was the only instance that triggered a
-Wall warning from gcc for my libc (more details in another mail, as
requested), so all other use of ctype is either through unsigned char or
int, rather than straight char.

-- 
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@xxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux