Re: make warning: subscript has type `char' in SquidPatch2

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Fri, 16 Oct 1998 11:02:59 -0600 (MDT)

On Fri, 16 Oct 1998, Dan wrote:

> Dear all,
> I have a problem with compilation at Solaris 2.6 , gcc 2.8.0
> .....
> mime.c:87: warning: subscript has type `char'
> mime.c:91: warning: subscript has type `char'
> mime.c:102: warning: subscript has type `char'
> mime.c:107: warning: subscript has type `char'
> client_side.c:1903: warning: subscript has type `char'
> client_side.c:2094: warning: subscript has type `char'

> what can be a problem .. .. ? (char)
> The same problem in Solaris2.5 , gcc 2.7.0

All these warnings come when we call isspace(character). Apparently, on your
machines isspace() is a macro that uses its argument as an index to an array.
Not much we can do here. I bet casting the argument to (int) would cause
warnings on other platforms. :(
 
> Any ideas as welcome.

Ignore the warning until somebody writes a patch that replaces all isspace
occurrences with xisspace(), a system-dependent cast-and-call macro...

Alex.
Received on Fri Oct 16 1998 - 10:58:54 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:42:32 MST