[Freeciv-Dev] (PR#7121) casting sockaddr and sockaddr_in
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#7121) casting sockaddr and sockaddr_in |
From: |
"Brett Albertson" <brett.albertson@xxxxxxxxxxxx> |
Date: |
Fri, 19 Dec 2003 12:30:22 -0800 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7121 >
During compilation of the current CVS code, I get this on Solaris 9:
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl -I./aicore -g -O2
-Werror -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes
-Wmissing-declarations -MT netintf.o -MD -MP -MF ".deps/netintf.Tpo" -c
-o netintf.o netintf.c; \
then mv -f ".deps/netintf.Tpo" ".deps/netintf.Po"; else rm -f
".deps/netintf.Tpo"; exit 1; fi
netintf.c: In function `net_lookup_service':
netintf.c:175: warning: cast increases required alignment of target type
make[3]: *** [netintf.o] Error 1
make[3]: Leaving directory `/var/tmp/freeciv/common'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/freeciv/common'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/freeciv'
make: *** [all] Error 2
This is due to the following line:
sock = (struct sockaddr_in *) sa;
In the code, sa is declared as:
struct sockaddr *sa
I think casting sockaddr to a sockaddr_in type in Solaris is a bad
thing. I'm not sure how to fix it.
thanks,
--
Brett Albertson
brett.albertson@xxxxxxxxxxxx
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#7121) casting sockaddr and sockaddr_in,
Brett Albertson <=
|
|