[Freeciv-Dev] 3 suspicous code parts
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hi,
the source has some suspicous format strings:
server/gamehand.c lines 429 and 719:
%8X is used, where %X is non-standard. Only lower case %x ist standard.
I know at least 1 compiler, which does not support %X.
clients/options.c lines 272 and 314:
%2.2d is used, but %d does not support anything with '.'. It is integer
an not floating point.
And another thing:
server/meta.c line 193:
if ((bad = ((serv_addr.sin_addr.s_addr = inet_addr(servername)) == -1))) {
Isn't the value of type u_long? It is at least on my machine.
So the compiler removes the comparison. Either it must be == (u_long) -1
or it has no effect:
warning 165 in line 193 of "server/meta.c": comparison redundant because
operand is unsigned
Ciao
____ _ _ ____ _ _ _ _ ____
| | | | | | \ / | | | the cool Gremlin from Bischofswerda
| __ | ____| | \/ | | | WWW: http://home.pages.de/~stoecker/
| | | | | | | | PGP key available on www page.
|____| _|_ |____| _|_ _|_ |____| I hope AMIGA never ends to make fun!
************************************************************************
* snail-mail: Dirk Stoecker * e-mail: *
* Geschwister-Scholl-Str. 10 * stoecker@xxxxxxxxxxxxxx *
* 01877 Bischofswerda * phone: *
* GERMANY * GERMANY +49 (0)3594/706666 *
************************************************************************
- [Freeciv-Dev] 3 suspicous code parts,
Dirk Stoecker <=
|
|