[Freeciv-Dev] Re: solaris warning
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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!"
|
|