Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2003:
[Freeciv-Dev] Re: solaris warning
Home

[Freeciv-Dev] Re: solaris warning

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: solaris warning
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Wed, 4 Jun 2003 00:12:32 +0200

On Thu, May 29, 2003 at 05:58:20PM +0000, Per I. Mathisen wrote:
> More:
> 
> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl    -g -O2 -Werror -Wall
> -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations
> -c `test -f 'packets.c' || echo './'`packets.c
> cc1: warnings being treated as errors
> packets.c: In function `receive_packet_tile_info':
> packets.c:1161: warning: cast increases required alignment of target type
> make[3]: *** [packets.o] Error 1
> 
> Line in question:
>     dio_get_uint16(&din, (int *)&packet->continent);

This is a real error. The only fact is that this field is at the and
of this struct.

Also note that packets.c in general is very robust. It fails for
example if sizeof(some enum) != sizeof(int).

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Reality? That's where the pizza delivery guy comes from!"



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