Complete.Org: Mailing Lists: Archives: freeciv-dev: December 1999:
[Freeciv-Dev] [PATCH] code cleanup
Home

[Freeciv-Dev] [PATCH] code cleanup

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] [PATCH] code cleanup
From: Markus Linnala <maage@xxxxxxxxx>
Date: 30 Dec 1999 22:22:26 +0200
Reply-to: Markus Linnala <maage@xxxxxxxxx>

Here's patch to silence some compiler warnings.

Index: client/helpdata.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/helpdata.c,v
retrieving revision 1.20
diff -u -r1.20 helpdata.c
--- helpdata.c  1999/12/27 14:42:07     1.20
+++ helpdata.c  1999/12/30 20:13:27
@@ -873,10 +873,11 @@
   return buf;
 }
 
+#if 0
 /****************************************************************
   Similar to above, with eg: "1s/1h"
 *****************************************************************/
-char *helptext_unit_upkeep_str_short(int i)
+static char *helptext_unit_upkeep_str_short(int i)
 {
   static char buf[32];
   struct unit_type *utype = get_unit_type(i);
@@ -906,3 +907,4 @@
   }
   return buf;
 }
+#endif
Index: client/tilespec.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v
retrieving revision 1.16
diff -u -r1.16 tilespec.c
--- tilespec.c  1999/11/19 15:41:30     1.16
+++ tilespec.c  1999/12/30 20:13:27
@@ -195,7 +195,7 @@
   Returns the correct name of the gfx file (with path and extension)
   Must be free'd when no longer used
 ***********************************************************************/
-char *tilespec_gfx_filename(const char *gfx_filename)
+static char *tilespec_gfx_filename(const char *gfx_filename)
 {
   char **gfx_fileexts;
   char *full_name,*real_full_name,*gfx_current_fileext;
Index: client/gui-gtk/cityrep.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/cityrep.c,v
retrieving revision 1.21
diff -u -r1.21 cityrep.c
--- cityrep.c   1999/12/27 12:18:45     1.21
+++ cityrep.c   1999/12/30 20:13:27
@@ -553,21 +553,21 @@
   }
 }
 
-gboolean
+static gboolean
 city_select_all_callback(GtkWidget *w, gpointer data)
 {
   gtk_clist_select_all( GTK_CLIST(city_list));
   return TRUE;
 }
 
-gboolean
+static gboolean
 city_unselect_all_callback(GtkWidget *w, gpointer data)
 {
   gtk_clist_unselect_all( GTK_CLIST(city_list));
   return TRUE;
 }
 
-gboolean
+static gboolean
 city_invert_selection_callback(GtkWidget *w, gpointer data)
 {
   gint i;
@@ -583,7 +583,7 @@
   return TRUE;
 }
 
-gboolean
+static gboolean
 city_select_coastal_callback(GtkWidget *w, gpointer data)
 {
   gint i;
@@ -601,7 +601,7 @@
   return TRUE;
 }
 
-gboolean
+static gboolean
 city_select_same_island_callback(GtkWidget *w, gpointer data)
 {
   gint i;
Index: server/barbarian.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/barbarian.c,v
retrieving revision 1.3
diff -u -r1.3 barbarian.c
--- barbarian.c 1999/12/27 14:33:41     1.3
+++ barbarian.c 1999/12/30 20:13:29
@@ -129,7 +129,7 @@
 Dead barbarians forget the map and lose the money.
 **************************************************************************/
 
-struct player *create_barbarian_player(int land)
+static struct player *create_barbarian_player(int land)
 {
   int newplayer = game.nplayers;
   struct player *barbarians;
Index: server/barbarian.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/barbarian.h,v
retrieving revision 1.1
diff -u -r1.1 barbarian.h
--- barbarian.h 1999/11/19 15:41:36     1.1
+++ barbarian.h 1999/12/30 20:13:29
@@ -31,8 +31,9 @@
 #define MAP_FACTOR     2000  /* adjust this to get a good uprising frequency */
 
 int unleash_barbarians(struct player* vict, int x, int y);
-void summon_barbarians();
+void summon_barbarians(void);
 int is_land_barbarian(struct player *pplayer);
 int is_sea_barbarian(struct player *pplayer);
+void summon_barbarians(void);
 
 #endif  /* FC__BARBARIAN_H */

-- 
//Markus

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