Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] (PR#3415) Make compiler happy
Home

[Freeciv-Dev] (PR#3415) Make compiler happy

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#3415) Make compiler happy
From: "Raimar Falke" <rf13@xxxxxxxxxxxxxxxxx>
Date: Thu, 13 Feb 2003 07:52:25 -0800


And the usual changes to make the compiler happ.y

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  Living on earth may be expensive, but it includes an annual free trip
  around the sun.

Index: common/hash.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/hash.c,v
retrieving revision 1.24
diff -u -u -r1.24 hash.c
--- common/hash.c       2003/02/08 11:21:46     1.24
+++ common/hash.c       2003/02/13 15:48:55
@@ -464,6 +464,7 @@
     return deleted;
   }
   die("Full hash table -- and somehow did not resize!!");
+  return NULL;
 }
 
 /**************************************************************************
@@ -613,6 +614,7 @@
     counter++;
   }
   die("never reached");
+  return NULL;
 }
 
 /**************************************************************************
Index: common/inputfile.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/inputfile.c,v
retrieving revision 1.33
diff -u -u -r1.33 inputfile.c
--- common/inputfile.c  2003/01/20 15:44:28     1.33
+++ common/inputfile.c  2003/02/13 15:48:56
@@ -124,11 +124,11 @@
 static const char *get_token_comma(struct inputfile *inf);
 static const char *get_token_value(struct inputfile *inf);
 
-struct {
+static struct {
   const char *name;
   get_token_fn_t func;
 }
-static tok_tab[INF_TOK_LAST] =
+tok_tab[INF_TOK_LAST] =
 {
   { "section_name", get_token_section_name },
   { "entry_name",   get_token_entry_name },
Index: common/packets.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/packets.c,v
retrieving revision 1.237
diff -u -u -r1.237 packets.c
--- common/packets.c    2003/02/10 21:43:42     1.237
+++ common/packets.c    2003/02/13 15:49:03
@@ -3201,7 +3201,7 @@
   assert(packet->chunk_length <= packet->total_length);
   assert(packet->offset >= 0 && packet->offset < packet->total_length);
 
-  assert(dio_input_remaining(&din) != -1);
+  assert(packet->chunk_length != -1);
   assert(dio_input_remaining(&din) == packet->chunk_length);
 
   dio_get_memory(&din, packet->data, packet->chunk_length);
Index: common/player.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/player.c,v
retrieving revision 1.111
diff -u -u -r1.111 player.c
--- common/player.c     2003/02/12 22:22:33     1.111
+++ common/player.c     2003/02/13 15:49:04
@@ -506,6 +506,7 @@
   if (type < DS_LAST)
     return Q_(ds_names[type]);
   die("Bad diplstate_type in diplstate_text: %d", type);
+  return NULL;
 }
 
 /***************************************************************
Index: common/player.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/player.h,v
retrieving revision 1.93
diff -u -u -r1.93 player.h
--- common/player.h     2003/02/10 21:43:42     1.93
+++ common/player.h     2003/02/13 15:49:05
@@ -53,7 +53,7 @@
   H_TARGETS=512, /* can't target anything it doesn't know exists */
   H_HUTS=1024, /* doesn't know which unseen tiles have huts on them */
   H_FOG=2048, /* can't see through fog of war */
-  H_NOPLANES=4096, /* doesn't build planes */
+  H_NOPLANES=4096 /* doesn't build planes */
 };
 
 struct player_economic {
Index: common/unit.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/unit.c,v
retrieving revision 1.169
diff -u -u -r1.169 unit.c
--- common/unit.c       2003/01/09 02:36:37     1.169
+++ common/unit.c       2003/02/13 15:49:08
@@ -921,6 +921,7 @@
      }
    default:
     die("Unknown unit activity %d in unit_activity_text()", punit->activity);
+    return NULL;
   }
 }
 
Index: server/citytools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/citytools.c,v
retrieving revision 1.210
diff -u -u -r1.210 citytools.c
--- server/citytools.c  2003/02/12 22:22:34     1.210
+++ server/citytools.c  2003/02/13 15:49:19
@@ -1135,7 +1135,7 @@
   struct player *pplayer = city_owner(pcity);
   struct tile *ptile = map_get_tile(pcity->x, pcity->y);
   bool effect_update, had_palace = pcity->improvements[B_PALACE] != I_NONE;
-  char *city_name = strdup(pcity->name);
+  char *city_name = mystrdup(pcity->name);
 
   gamelog(GAMELOG_LOSEC, _("%s lose %s (%i,%i)"),
          get_nation_name_plural(pplayer->nation), pcity->name, pcity->x,
Index: server/report.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/report.c,v
retrieving revision 1.42
diff -u -u -r1.42 report.c
--- server/report.c     2002/12/18 19:05:22     1.42
+++ server/report.c     2003/02/13 15:49:21
@@ -1129,7 +1129,7 @@
                            const char *headline, const char *lines,
                            int event)
 {
-  size_t len;
+  int len;
   struct packet_generic_message genmsg;
 
   len = my_snprintf(genmsg.message, sizeof(genmsg.message),

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#3415) Make compiler happy, Raimar Falke <=