Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2001:
[Freeciv-Dev] Re: Compiler-warnings
Home

[Freeciv-Dev] Re: Compiler-warnings

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx (Freeciv developers)
Subject: [Freeciv-Dev] Re: Compiler-warnings
From: Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: 25 Jan 2001 11:56:13 +0100

Reinier Post <rp@xxxxxxxxxx> writes:

> On Tue, Jan 23, 2001 at 10:05:01PM +0100, Falk Hueffner wrote:
> > Gerhard Killesreiter <killesreiter@xxxxxxxxxxxxxxxxxxxxxx> writes:
> > 
> > > When compiling on IRIX with gcc I get a lot of warnings:
> > > 
> > > stdinhand.c: In function `cmdlevel_command':
> > > stdinhand.c:1957: warning: subscript has type `char'
> 
> This is my code, and the subscript is a subscript in a short array.
> The intention was to use a shorter integer, so 'unsigned char' is what
> is intended here.  In all the other 'subscript' cases, you can assume
> that unsigned chars were intended as well.

Well, you never subscript the array with a char. There's nothing wrong
with your code. The warning is only triggered by the weird IRIX
isalnum macros, and there's nothing one can do about it except
-Wno-char-subscript. Please don't fix what's not broken.

        Falk




[Prev in Thread] Current Thread [Next in Thread]