[Bug 377] New: Reduce compiler warnings. Use unsigned args to the ctype.h is*() macros.

Florian Weimer Weimer at CERT.Uni-Stuttgart.DE
Fri Aug 2 23:23:37 EST 2002


bugzilla-daemon at mindrot.org writes:

> Given the possibility of characters outside of the 0 thru 0x7f range
> and the implementation of the is*() macros as using an index into an
> array, negative arguments could lead to unexpected behavior.
>
> log:
> 	* canohost.c (get_remote_hostname): Argument to macro
> 	isupper() should be unsigned.

This is not quite correct on compilers with signed chars.  Arguments
for the is* functions are indeed ints.  (I think the warnings are
bogus.)

-- 
Florian Weimer 	                  Weimer at CERT.Uni-Stuttgart.DE
University of Stuttgart           http://CERT.Uni-Stuttgart.DE/people/fw/
RUS-CERT                          fax +49-711-685-5898



More information about the openssh-unix-dev mailing list