[Freeciv-Dev] Re: Compiler-warnings
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Gerhard Killesreiter <killesreiter@xxxxxxxxxxxxxxxxxxxxxx> writes:
> Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx> writes:
>
> > They are very significant on systems where 'char' defaults to 'signed
> > char' (like ARM), and the characters are in the 128...255 range, since
> > then a negative offset will be taken, which is rarely what was
> > meant. This especially evil since often only 7 bit characters are in
> > use, so it goes unnotified for a while.
>
> Hmm.
>
> Dirk Stoecker <stoecker@xxxxxxxxxxxxxx> writes:
>
> > I have equal messages (and lots of others) on Amiga. This message should
> > be (if equal to SAS-C) a warning, that char types are passed as function
> > argument, e.g. func(char a, int b). This is "possible" portability
> > problem, as in real the passed argument is of type int.
No, it's a warning about a chat used as array subscript. There's no
problem in passing chars as parameters, as long as you have proper
declarations.
> _Iff_ somebody would explain to me what to change in the source, I
> _might_ try my hands on a patch. To silence the warnings, or do
> whatever to them.
On a closer look, those warnings are from lines with functions like
isalnum. Most likely those are actually macros on Irix, similar to
this:
#define isalnum(c) ISALNUM_TABLE[c]
So the solution is to complain to your library vendor to add a cast to
that macro :) Or use unsigned char everywhere. Or ignore it.
Falk
- [Freeciv-Dev] Re: Compiler-warnings, (continued)
- [Freeciv-Dev] Re: Compiler-warnings, Dirk Stoecker, 2001/01/24
- [Freeciv-Dev] Re: Compiler-warnings, Gerhard Killesreiter, 2001/01/24
- [Freeciv-Dev] Re: Compiler-warnings, Raimar Falke, 2001/01/24
- [Freeciv-Dev] Re: Compiler-warnings, Gerhard Killesreiter, 2001/01/24
- [Freeciv-Dev] Re: Compiler-warnings, Raimar Falke, 2001/01/24
- [Freeciv-Dev] Re: Compiler-warnings, Stepan Roh, 2001/01/24
- [Freeciv-Dev] Re: Compiler-warnings, Raimar Falke, 2001/01/24
- [Freeciv-Dev] Re: Compiler-warnings, Tony Stuckey, 2001/01/24
- [Freeciv-Dev] Re: Compiler-warnings, Stepan Roh, 2001/01/24
- [Freeciv-Dev] Re: Compiler-warnings, Raimar Falke, 2001/01/24
- [Freeciv-Dev] Re: Compiler-warnings,
Falk Hueffner <=
- [Freeciv-Dev] Re: Compiler-warnings, Dirk Stoecker, 2001/01/25
[Freeciv-Dev] Re: Compiler-warnings, Reinier Post, 2001/01/24
[Freeciv-Dev] Re: Compiler-warnings, Dirk Stoecker, 2001/01/24
|
|