Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] Re: (PR#9750) AutoReply: compile warning in 1.14
Home

[Freeciv-Dev] Re: (PR#9750) AutoReply: compile warning in 1.14

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#9750) AutoReply: compile warning in 1.14
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 20 Aug 2004 13:01:42 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9750 >

There was a typo.  Here's a fixed patch.  Still untested.

jason


? freeciv-1.14.99-devel.tar.gz
? common/aicore/.deps
? common/aicore/Makefile
? common/aicore/Makefile.in
? data/nation/Makefile.am
? doc/de/Makefile
? doc/de/Makefile.in
? doc/fr/Makefile
? doc/fr/Makefile.in
? doc/it/Makefile
? doc/it/Makefile.in
? doc/ja/Makefile
? doc/ja/Makefile.in
? doc/man/Makefile
? doc/man/Makefile.in
? doc/nl/Makefile
? doc/nl/Makefile.in
? doc/sv/Makefile
? doc/sv/Makefile.in
? server/civmanual.c
Index: common/packets.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets.c,v
retrieving revision 1.219.2.4
diff -u -r1.219.2.4 packets.c
--- common/packets.c    19 Jul 2003 04:08:39 -0000      1.219.2.4
+++ common/packets.c    20 Aug 2004 20:01:02 -0000
@@ -185,7 +185,7 @@
 void *get_packet_from_connection(struct connection *pc,
                                 enum packet_type *ptype, bool * presult)
 {
-  int len;
+  int len, itype;
   enum packet_type type;
   struct data_in din;
 
@@ -199,7 +199,8 @@
 
   dio_input_init(&din, pc->buffer->data, pc->buffer->ndata);
   dio_get_uint16(&din, &len);
-  dio_get_uint8(&din, (int *) &type);
+  dio_get_uint8(&din, &itype);
+  type = itype;
 
   if(pc->first_packet) {
     /* the first packet better be short: */
@@ -2890,7 +2891,7 @@
 struct packet_goto_route *receive_packet_goto_route(struct connection *pc)
 {
   struct data_in din;
-  int i, num_valid = 0;
+  int i, num_valid = 0, itype;
   enum packet_goto_route_type type;
   struct map_position pos[GOTO_CHUNK];
   struct map_position *pos2;
@@ -2901,7 +2902,8 @@
   dio_get_uint16(&din, NULL);
   dio_get_uint8(&din, NULL);
 
-  dio_get_uint8(&din, (int *)&type);
+  dio_get_uint8(&din, &itype);
+  type = itype;
   for (i = 0; i < GOTO_CHUNK; i++) {
     dio_get_uint8(&din, &pos[i].x);
     dio_get_uint8(&din, &pos[i].y);

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#9750) AutoReply: compile warning in 1.14, Jason Short <=