diff -Nur -X/data/freeciv-dev/freeciv/diff_ignore freeciv/ai/aiunit.c codeciv/ai/aiunit.c --- freeciv/ai/aiunit.c Tue Jan 9 23:28:11 2001 +++ codeciv/ai/aiunit.c Wed Jan 10 00:41:00 2001 @@ -258,7 +258,6 @@ /* BEGIN PART ONE: Look for huts. Non-Barbarian Ground units ONLY. */ if (!is_barbarian(pplayer) && is_ground_unit(punit)) { /* boats don't hunt huts */ - int x1, y1; int maxcost = pplayer->ai.control ? 2 * THRESHOLD : 3; int bestcost = maxcost * 3 + 1; @@ -304,7 +303,6 @@ while (punit->moves_left) { int most_unknown = 0; int unknown; - int x1, y1, x2, y2; int landnear; /* evaluate all adjacent tiles */ @@ -359,7 +357,6 @@ && !is_non_allied_unit_tile(ptile, punit->owner) && !is_non_allied_city_tile(ptile, punit->owner) && tile_is_accessible(punit, x1, y1)) { - int x2, y2; square_iterate(x1, y1, range, x2, y2) { if (!map_get_known(x2, y2, pplayer)) unknown++; diff -Nur -X/data/freeciv-dev/freeciv/diff_ignore freeciv/client/packhand.c codeciv/client/packhand.c --- freeciv/client/packhand.c Tue Jan 9 23:28:16 2001 +++ codeciv/client/packhand.c Wed Jan 10 00:36:59 2001 @@ -250,7 +250,6 @@ center_tile_mapcanvas(punit->x, punit->y); } else { /* Just any known tile will do; search near the middle first. */ - int x, y; iterate_outward(map.xsize/2, map.ysize/2, MAX(map.xsize/2, map.ysize/2), x, y) { diff -Nur -X/data/freeciv-dev/freeciv/diff_ignore freeciv/common/city.c codeciv/common/city.c --- freeciv/common/city.c Tue Jan 9 23:28:46 2001 +++ codeciv/common/city.c Wed Jan 10 00:39:48 2001 @@ -1233,8 +1233,6 @@ **************************************************************************/ int is_friendly_city_near(int player_id, int x, int y) { - int x1, y1; - square_iterate (x, y, 3, x1, y1) { struct city * pcity = map_get_city (x1, y1); if (pcity && players_allied(player_id, pcity->owner)) diff -Nur -X/data/freeciv-dev/freeciv/diff_ignore freeciv/common/map.h codeciv/common/map.h --- freeciv/common/map.h Tue Jan 9 23:28:47 2001 +++ codeciv/common/map.h Wed Jan 10 00:34:51 2001 @@ -272,6 +272,7 @@ */ #define iterate_outward(ARG_start_x, ARG_start_y, ARG_max_dist, ARG_x_itr, ARG_y_itr) \ { \ + int ARG_x_itr, ARG_y_itr; \ int MACRO_max_dx = map.xsize/2; \ int MACRO_min_dx = -(MACRO_max_dx - (map.xsize%2 ? 0 : 1)); \ int MACRO_xcycle = 1; \ @@ -323,6 +324,7 @@ */ #define square_iterate(SI_center_x, SI_center_y, radius, SI_x_itr, SI_y_itr) \ { \ + int SI_x_itr, SI_y_itr; \ int SI_x_itr1; \ for (SI_y_itr = (SI_center_y) - (radius); \ SI_y_itr <= (SI_center_y) + (radius); SI_y_itr++) { \ @@ -340,6 +342,7 @@ /* Iterate through all tiles adjacent to a tile */ #define adjc_iterate(RI_center_x, RI_center_y, RI_x_itr, RI_y_itr) \ { \ + int SI_x_itr, SI_y_itr; \ int RI_x_itr1; \ for (RI_y_itr = RI_center_y - 1; \ RI_y_itr <= RI_center_y + 1; RI_y_itr++) { \ diff -Nur -X/data/freeciv-dev/freeciv/diff_ignore freeciv/server/cityhand.c codeciv/server/cityhand.c --- freeciv/server/cityhand.c Tue Jan 9 23:29:11 2001 +++ codeciv/server/cityhand.c Wed Jan 10 00:43:32 2001 @@ -749,7 +749,6 @@ **************************************************************************/ static void send_adjacent_cities(struct city *pcity) { - int x, y; square_iterate(pcity->x, pcity->y, CITY_MAP_SIZE-1, x, y) { struct city *pcity2 = map_get_city(x, y); if (pcity2 && pcity2 != pcity) { diff -Nur -X/data/freeciv-dev/freeciv/diff_ignore freeciv/server/maphand.c codeciv/server/maphand.c --- freeciv/server/maphand.c Tue Jan 9 23:29:13 2001 +++ codeciv/server/maphand.c Wed Jan 10 00:39:09 2001 @@ -463,7 +463,6 @@ **************************************************************************/ void unfog_area(struct player *pplayer, int x, int y, int len) { - int abs_x, abs_y; int playerid = pplayer->player_no; /* Did the tile just become visible? - send info about units and cities and the tile itself */ @@ -496,8 +495,6 @@ static void send_NODRAW_tiles(struct player *pplayer, struct conn_list *dest, int x, int y, int len) { - int abs_x,abs_y; - conn_list_do_buffer(dest); square_iterate(x, y, len+1, abs_x, abs_y) { if (!map_get_sent(abs_x, abs_y, pplayer)) { @@ -529,7 +526,6 @@ **************************************************************************/ void fog_area(struct player *pplayer, int x, int y, int len) { - int abs_x, abs_y; int playerid = pplayer->player_no; buffer_shared_vision(pplayer); @@ -718,8 +714,6 @@ **************************************************************************/ void show_area(struct player *pplayer, int x, int y, int len) { - int abs_x, abs_y; - buffer_shared_vision(pplayer); square_iterate(x, y, len, abs_x, abs_y) { /* the player himself */ diff -Nur -X/data/freeciv-dev/freeciv/diff_ignore freeciv/server/plrhand.c codeciv/server/plrhand.c --- freeciv/server/plrhand.c Tue Jan 9 23:29:13 2001 +++ codeciv/server/plrhand.c Wed Jan 10 00:39:20 2001 @@ -1294,8 +1294,6 @@ **************************************************************************/ void maybe_make_first_contact(int x, int y, int playerid) { - int x_itr, y_itr; - square_iterate(x, y, 1, x_itr, y_itr) { struct tile *ptile = map_get_tile(x_itr, y_itr); struct city *pcity = ptile->city; diff -Nur -X/data/freeciv-dev/freeciv/diff_ignore freeciv/server/unittools.c codeciv/server/unittools.c --- freeciv/server/unittools.c Wed Jan 10 00:31:02 2001 +++ codeciv/server/unittools.c Wed Jan 10 00:39:32 2001 @@ -837,7 +837,6 @@ if (punit->fuel == 1 && !is_airunit_refuel_point(punit->x, punit->y, punit->owner, punit->type, 1)) { - int x_itr, y_itr; iterate_outward(punit->x, punit->y, punit->moves_left/3, x_itr, y_itr) { if (is_airunit_refuel_point(x_itr, y_itr, punit->owner, punit->type, 0) && (air_can_move_between(punit->moves_left/3, punit->x, punit->y, @@ -2796,7 +2795,6 @@ *****************************************************************/ static void wakeup_neighbor_sentries(struct unit *punit) { - int x, y; /* There may be sentried units with a sightrange>3, but we don't wake them up if the punit is farther away than 3. */ square_iterate(punit->x, punit->y, 3, x, y) {