http://bugs.freeciv.org/Ticket/Display.html?id=39479 >
On 01/08/07, Marko Lindqvist <[EMAIL PROTECTED]> wrote:
>
> I get a lot of warnings like $subject.
Patch
- ML
diff -Nurd -X.diff_ignore freeciv/common/government.c freeciv/common/government.c
--- freeciv/common/government.c 2007-08-01 17:17:24.0 +0300
+++ freeciv/common/government.c 2007-08-01 20:11:59.0 +0300
@@ -67,7 +67,7 @@
/**
Return the number of governments.
**/
-const int government_count(void)
+int government_count(void)
{
return game.control.government_count;
}
@@ -78,7 +78,7 @@
Currently same as government_number(), paired with government_count()
indicates use as an array index.
**/
-const int government_index(const struct government *pgovern)
+int government_index(const struct government *pgovern)
{
assert(pgovern);
return pgovern - governments;
@@ -87,7 +87,7 @@
/**
Return the government index.
**/
-const int government_number(const struct government *pgovern)
+int government_number(const struct government *pgovern)
{
assert(pgovern);
return pgovern->item_number;
diff -Nurd -X.diff_ignore freeciv/common/government.h freeciv/common/government.h
--- freeciv/common/government.h 2007-08-01 17:17:24.0 +0300
+++ freeciv/common/government.h 2007-08-01 20:11:02.0 +0300
@@ -59,9 +59,9 @@
/* General government accessor functions. */
-const int government_count(void);
-const int government_index(const struct government *pgovern);
-const int government_number(const struct government *pgovern);
+int government_count(void);
+int government_index(const struct government *pgovern);
+int government_number(const struct government *pgovern);
struct government *government_by_number(const int gov);
struct government *government_of_player(const struct player *pplayer);
diff -Nurd -X.diff_ignore freeciv/common/nation.c freeciv/common/nation.c
--- freeciv/common/nation.c 2007-08-01 17:17:24.0 +0300
+++ freeciv/common/nation.c 2007-08-01 20:12:51.0 +0300
@@ -295,7 +295,7 @@
/**
Return the nation index.
**/
-const Nation_type_id nation_number(const struct nation_type *pnation)
+Nation_type_id nation_number(const struct nation_type *pnation)
{
assert(pnation);
return pnation->item_number;
@@ -307,7 +307,7 @@
Currently same as nation_number(), paired with nation_count()
indicates use as an array index.
**/
-const Nation_type_id nation_index(const struct nation_type *pnation)
+Nation_type_id nation_index(const struct nation_type *pnation)
{
assert(pnation);
return pnation - nations;
@@ -316,7 +316,7 @@
/
Return the number of nations.
/
-const Nation_type_id nation_count(void)
+Nation_type_id nation_count(void)
{
return game.control.nation_count;
}
@@ -493,7 +493,7 @@
/
Return the number of nation groups.
/
-const int nation_group_count(void)
+int nation_group_count(void)
{
return num_nation_groups;
}
@@ -501,7 +501,7 @@
/**
Return the nation group index.
**/
-const int nation_group_index(const struct nation_group *pgroup)
+int nation_group_index(const struct nation_group *pgroup)
{
assert(pgroup);
return pgroup - nation_groups;
@@ -510,7 +510,7 @@
/**
Return the nation group index.
**/
-const int nation_group_number(const struct nation_group *pgroup)
+int nation_group_number(const struct nation_group *pgroup)
{
assert(pgroup);
return pgroup->item_number;
diff -Nurd -X.diff_ignore freeciv/common/nation.h freeciv/common/nation.h
--- freeciv/common/nation.h 2007-08-01 17:17:24.0 +0300
+++ freeciv/common/nation.h 2007-08-01 20:09:57.0 +0300
@@ -109,9 +109,9 @@
};
/* General nation accessor functions. */
-const Nation_type_id nation_count(void);
-const Nation_type_id nation_index(const struct nation_type *pnation);
-const Nation_type_id na