warnings from use of ctype.h methods
DJ Delorie
dj@redhat.com
Fri Mar 12 00:00:00 GMT 2010
In the case where you have a string, and you're explicitly checking for
NUL elsewhere, the right thing to do is to map the data you have into
the domain the function wants. In this case, a cast to (unsigned char)
gives your data the correct interpretation for the is*() functions.
If you cast a plain char to an int, you get values in the set
[-128..127], which is not the domain of values the is*() functions
expect. You should provide the is*() functions values in the set
[0..255, EOF].
More information about the Newlib
mailing list