Index: client/climisc.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/climisc.c,v retrieving revision 1.74 diff -u -r1.74 climisc.c --- client/climisc.c 2002/02/02 14:07:33 1.74 +++ client/climisc.c 2002/02/07 07:50:58 @@ -271,7 +271,7 @@ if(this_con==-1) { ptile->continent = new_continent_num(); freelog(LOG_DEBUG, "new client continent %d at (%d %d)", - ptile->continent, x, y); + (int)ptile->continent, x, y); } } @@ -1081,7 +1081,7 @@ if (pship->propulsion) { my_snprintf(travel_buf, sizeof(travel_buf), _("Travel time: %5.1f years"), - (float) (0.1 * ((int) (pship->travel_time * 10.0)))); + (double) (0.1 * ((int) (pship->travel_time * 10.0)))); } else { my_snprintf(travel_buf, sizeof(travel_buf), "%s", _("Travel time: N/A ")); Index: client/control.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/control.c,v retrieving revision 1.64 diff -u -r1.64 control.c --- client/control.c 2001/12/08 15:15:50 1.64 +++ client/control.c 2002/02/07 07:50:59 @@ -773,7 +773,7 @@ if (!(action==PACKET_UNIT_ESTABLISH_TRADE ||(action==PACKET_UNIT_HELP_BUILD_WONDER))) { freelog(LOG_ERROR, "Bad action (%d) in request_unit_caravan_action", - action); + (int)action); return; } Index: client/goto.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/goto.c,v retrieving revision 1.29 diff -u -r1.29 goto.c --- client/goto.c 2002/02/05 19:05:44 1.29 +++ client/goto.c 2002/02/07 07:50:59 @@ -194,7 +194,8 @@ *x = our_array->pos[our_array->first_pos].x; *y = our_array->pos[our_array->first_pos].y; our_array->first_pos++; - freelog(LOG_DEBUG, "got %i,%i, at cost %i", *x, *y, goto_map.move_cost[*x][*y]); + freelog(LOG_DEBUG, "got %i,%i, at cost %i", *x, *y, + (int) goto_map.move_cost[*x][*y]); return 1; } return 0; Index: client/helpdata.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/helpdata.c,v retrieving revision 1.40 diff -u -r1.40 helpdata.c --- client/helpdata.c 2002/01/17 10:26:29 1.40 +++ client/helpdata.c 2002/02/07 07:51:00 @@ -311,7 +311,7 @@ } } } else { - freelog(LOG_FATAL, "Bad current_type %d", current_type); + freelog(LOG_FATAL, "Bad current_type %d", (int)current_type); exit(1); } genlist_sort(&category_nodes, help_item_compar); Index: client/packhand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v retrieving revision 1.209 diff -u -r1.209 packhand.c --- client/packhand.c 2002/02/02 09:21:31 1.209 +++ client/packhand.c 2002/02/07 07:51:02 @@ -1824,15 +1824,15 @@ freelog(LOG_DEBUG, " terr_gate..."); for (inx = 0; b->terr_gate[inx] != T_LAST; inx++) { freelog(LOG_DEBUG, " %2d/%s", - b->terr_gate[inx], get_terrain_name(b->terr_gate[inx])); + (int)b->terr_gate[inx], get_terrain_name(b->terr_gate[inx])); } freelog(LOG_DEBUG, " spec_gate..."); for (inx = 0; b->spec_gate[inx] != S_NO_SPECIAL; inx++) { freelog(LOG_DEBUG, " %2d/%s", - b->spec_gate[inx], get_special_name(b->spec_gate[inx])); + (int)b->spec_gate[inx], get_special_name(b->spec_gate[inx])); } freelog(LOG_DEBUG, " equiv_range %2d/%s", - b->equiv_range, effect_range_name(b->equiv_range)); + (int)b->equiv_range, effect_range_name(b->equiv_range)); freelog(LOG_DEBUG, " equiv_dupl..."); for (inx = 0; b->equiv_dupl[inx] != B_LAST; inx++) { freelog(LOG_DEBUG, " %2d/%s", @@ -1854,11 +1854,11 @@ char buf[1024], *ptr; ptr = buf; my_snprintf(ptr, sizeof(buf)-(ptr-buf), " %d/%s", - b->effect[inx].type, + (int)b->effect[inx].type, effect_type_name(b->effect[inx].type)); ptr = strchr(ptr, '\0'); my_snprintf(ptr, sizeof(buf)-(ptr-buf), " range=%d/%s", - b->effect[inx].range, + (int)b->effect[inx].range, effect_range_name(b->effect[inx].range)); ptr = strchr(ptr, '\0'); my_snprintf(ptr, sizeof(buf)-(ptr-buf), " amount=%d", @@ -1890,7 +1890,7 @@ advances[b->effect[inx].cond_adv].name); ptr = strchr(ptr, '\0'); my_snprintf(ptr, sizeof(buf)-(ptr-buf), " cond_eff=%d/%s", - b->effect[inx].cond_eff, + (int)b->effect[inx].cond_eff, (b->effect[inx].cond_eff == EFT_LAST) ? "Uncond." : effect_type_name(b->effect[inx].cond_eff)); @@ -1898,13 +1898,13 @@ freelog(LOG_DEBUG, " %s", buf); ptr = buf; my_snprintf(ptr, sizeof(buf)-(ptr-buf), " aff_unit=%d/%s", - b->effect[inx].aff_unit, + (int)b->effect[inx].aff_unit, (b->effect[inx].aff_unit == UCL_LAST) ? "All" : unit_class_name(b->effect[inx].aff_unit)); ptr = strchr(ptr, '\0'); my_snprintf(ptr, sizeof(buf)-(ptr-buf), " aff_terr=%d/%s", - b->effect[inx].aff_terr, + (int)b->effect[inx].aff_terr, (b->effect[inx].aff_terr == T_LAST) ? "None" : (b->effect[inx].aff_terr == T_UNKNOWN) ? @@ -1912,7 +1912,7 @@ get_terrain_name(b->effect[inx].aff_terr)); ptr = strchr(ptr, '\0'); my_snprintf(ptr, sizeof(buf)-(ptr-buf), " aff_spec=%04X/%s", - b->effect[inx].aff_spec, + (unsigned int)b->effect[inx].aff_spec, (b->effect[inx].aff_spec == 0) ? "None" : (b->effect[inx].aff_spec == S_ALL) ? Index: client/tilespec.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/tilespec.c,v retrieving revision 1.59 diff -u -r1.59 tilespec.c --- client/tilespec.c 2002/01/06 16:43:25 1.59 +++ client/tilespec.c 2002/02/07 07:51:03 @@ -408,8 +408,9 @@ { static char c[9]; /* strlen("n0s0e0w0") + 1 == 9 */ - sprintf(c, "n%ds%de%dw%d", BOOL_VAL(idx&BIT_NORTH), BOOL_VAL(idx&BIT_SOUTH), - BOOL_VAL(idx&BIT_EAST), BOOL_VAL(idx&BIT_WEST)); + sprintf(c, "n%ds%de%dw%d", (int) BOOL_VAL(idx & BIT_NORTH), + (int) BOOL_VAL(idx & BIT_SOUTH), (int) BOOL_VAL(idx & BIT_EAST), + (int) BOOL_VAL(idx & BIT_WEST)); return c; } @@ -1082,7 +1083,7 @@ case DIR8_WEST: return DIR4_WEST; default: - freelog(LOG_FATAL, "dir8_to_dir4: bad direction %d.", dir8); + freelog(LOG_FATAL, "dir8_to_dir4: bad direction %d.", (int)dir8); abort(); } } Index: client/agents/cma_core.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/agents/cma_core.c,v retrieving revision 1.2 diff -u -r1.2 cma_core.c --- client/agents/cma_core.c 2002/02/05 19:05:45 1.2 +++ client/agents/cma_core.c 2002/02/07 07:51:04 @@ -247,7 +247,7 @@ freelog(LOG_NORMAL, "print_result(result=%p)", result); freelog(LOG_NORMAL, - "print_result: found_a_valid=%d disorder=%d happy=%d", + "print_result: found_a_valid=%hd disorder=%hd happy=%hd", result->found_a_valid, result->disorder, result->happy); #if UNUSED freelog(LOG_NORMAL, "print_result: workers at:"); @@ -280,13 +280,13 @@ } freelog(LOG_NORMAL, - "print_result: people: W/E/S/T %d/%d/%d/%d", + "print_result: people: W/E/S/T %d/%hd/%hd/%hd", worker, result->entertainers, result->scientists, result->taxmen); for (i = 0; i < NUM_STATS; i++) { freelog(LOG_NORMAL, - "print_result: %10s production=%d surplus=%d", + "print_result: %10s production=%hd surplus=%hd", cma_get_stat_name(i), result->production[i], result->surplus[i]); } @@ -784,8 +784,8 @@ /* Restore */ memcpy(pcity, &backup, sizeof(struct city)); - freelog(LOG_DEBUG, "xyz: w=%d e=%d s=%d t=%d trade=%d " - "sci=%d lux=%d tax=%d dis=%s happy=%s", + freelog(LOG_DEBUG, "xyz: w=%d e=%hd s=%hd t=%hd trade=%hd " + "sci=%hd lux=%hd tax=%hd dis=%s happy=%s", count_worker(pcity, result), result->entertainers, result->scientists, result->taxmen, result->production[TRADE], @@ -858,19 +858,19 @@ freelog(CALC_FITNESS_LOG_LEVEL2, "calc_fitness()"); freelog(CALC_FITNESS_LOG_LEVEL, - "calc_fitness: surplus={food=%d, shields=%d, trade=%d", + "calc_fitness: surplus={food=%hd, shields=%hd, trade=%hd", result->surplus[FOOD], result->surplus[SHIELD], result->surplus[TRADE]); freelog(CALC_FITNESS_LOG_LEVEL, - "calc_fitness: tax=%d, luxury=%d, science=%d}", + "calc_fitness: tax=%hd, luxury=%hd, science=%hd}", result->surplus[GOLD], result->surplus[LUXURY], result->surplus[SCIENCE]); freelog(CALC_FITNESS_LOG_LEVEL2, - "calc_fitness: factor={food=%d, shields=%d, trade=%d", + "calc_fitness: factor={food=%hd, shields=%hd, trade=%hd", parameter->factor[FOOD], parameter->factor[SHIELD], parameter->factor[TRADE]); freelog(CALC_FITNESS_LOG_LEVEL2, - "calc_fitness: tax=%d, luxury=%d, science=%d}", + "calc_fitness: tax=%hd, luxury=%hd, science=%hd}", parameter->factor[GOLD], parameter->factor[LUXURY], parameter->factor[SCIENCE]); freelog(CALC_FITNESS_LOG_LEVEL, @@ -1037,7 +1037,7 @@ pcity->size - (base_combination->worker + scientists + taxmen); freelog(LOG_DEBUG, - "fill_out_result(city='%s'(%d), entrt.s=%d, scien.s=%d, taxmen=%d)", + "fill_out_result(city='%s'(%d), entrt.s=%hd, scien.s=%hd, taxmen=%hd)", pcity->name, pcity->id, result->entertainers, result->scientists, result->taxmen); @@ -1404,8 +1404,8 @@ taxmen); freelog(FIND_BEST_SPECIALIST_ARRANGEMENT_LOG_LEVEL, - " optimize_people: got extra=(tax=%d, luxury=%d, " - "science=%d)", + " optimize_people: got extra=(tax=%hd, luxury=%hd, " + "science=%hd)", result.surplus[GOLD] - parameter->minimal_surplus[GOLD], result.surplus[LUXURY] - parameter->minimal_surplus[LUXURY], Index: client/agents/cma_fec.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/agents/cma_fec.c,v retrieving revision 1.3 diff -u -r1.3 cma_fec.c --- client/agents/cma_fec.c 2002/02/05 19:05:45 1.3 +++ client/agents/cma_fec.c 2002/02/07 07:51:05 @@ -341,25 +341,26 @@ for (j = 0; j < RESULT_COLUMNS; j++) my_snprintf(buf[j], BUFFER_SIZE, "---"); } else { - my_snprintf(buf[0], BUFFER_SIZE, "%3d(%+3d)", + my_snprintf(buf[0], BUFFER_SIZE, "%3hd(%+3hd)", result->production[FOOD], result->surplus[FOOD]); - my_snprintf(buf[1], BUFFER_SIZE, "%3d(%+3d)", + my_snprintf(buf[1], BUFFER_SIZE, "%3hd(%+3hd)", result->production[SHIELD], result->surplus[SHIELD]); - my_snprintf(buf[2], BUFFER_SIZE, "%3d(%+3d)", + my_snprintf(buf[2], BUFFER_SIZE, "%3hd(%+3hd)", result->production[TRADE], result->surplus[TRADE]); - my_snprintf(buf[3], BUFFER_SIZE, "%3d(%+3d)", + my_snprintf(buf[3], BUFFER_SIZE, "%3hd(%+3hd)", result->production[GOLD], result->surplus[GOLD]); - my_snprintf(buf[4], BUFFER_SIZE, "%3d(%+3d)", + my_snprintf(buf[4], BUFFER_SIZE, "%3hd(%+3hd)", result->production[LUXURY], result->surplus[LUXURY]); - my_snprintf(buf[5], BUFFER_SIZE, "%3d(%+3d)", + my_snprintf(buf[5], BUFFER_SIZE, "%3hd(%+3hd)", result->production[SCIENCE], result->surplus[SCIENCE]); - my_snprintf(buf[6], BUFFER_SIZE, "%d/%d/%d/%d%s", + my_snprintf(buf[6], BUFFER_SIZE, "%d/%hd/%hd/%hd%s", pcity->size - (result->entertainers + result->scientists + - result->taxmen), result->entertainers, result->scientists, - result->taxmen, result->happy ? _(" happy") : ""); + result->taxmen), result->entertainers, + result->scientists, result->taxmen, + result->happy ? _(" happy") : ""); my_snprintf(buf[7], BUFFER_SIZE, "%s", get_city_growth_string(pcity, result->surplus[FOOD])); Index: client/gui-gtk/mapview.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/mapview.c,v retrieving revision 1.112 diff -u -r1.112 mapview.c --- client/gui-gtk/mapview.c 2002/02/05 19:05:47 1.112 +++ client/gui-gtk/mapview.c 2002/02/07 07:51:06 @@ -871,7 +871,7 @@ int Ex = Nx + 2 * map_canvas_store_theight; int Ey = Ny + 2 * map_canvas_store_theight; - freelog(LOG_DEBUG, "wx,wy: %d,%d nx,ny:%d,%x ex,ey:%d,%d, sx,sy:%d,%d", + freelog(LOG_DEBUG, "wx,wy: %d,%d nx,ny:%d,%d ex,ey:%d,%d, sx,sy:%d,%d", Wx, Wy, Nx, Ny, Ex, Ey, Sx, Sy); /* W to N */ @@ -1100,7 +1100,7 @@ freelog(LOG_DEBUG, "dropping %d,%d", x, y); return; } - freelog(LOG_DEBUG, "putting %d,%d draw %x", x, y, draw); + freelog(LOG_DEBUG, "putting %d,%d draw %x", x, y, (int)draw); width = (draw & D_TMB_L) && (draw & D_TMB_R) ? NORMAL_TILE_WIDTH : NORMAL_TILE_WIDTH/2; if (!(draw & D_TMB_L)) Index: common/inputfile.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/inputfile.c,v retrieving revision 1.12 diff -u -r1.12 inputfile.c --- common/inputfile.c 2002/02/05 19:05:49 1.12 +++ common/inputfile.c 2002/02/07 07:51:07 @@ -552,7 +552,8 @@ func = tok_tab[type].func; if (func == NULL) { - freelog(LOG_NORMAL, "token type %d (%s) not supported yet", type, name); + freelog(LOG_NORMAL, "token type %d (%s) not supported yet", (int) type, + name); c = NULL; } else { if (!have_line(inf)) Index: common/ioz.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/ioz.c,v retrieving revision 1.6 diff -u -r1.6 ioz.c --- common/ioz.c 2001/08/13 11:21:38 1.6 +++ common/ioz.c 2002/02/07 07:51:07 @@ -124,7 +124,8 @@ break; default: /* Should never happen */ - freelog(LOG_FATAL, "Internal error: Bad fz_fopen method: %d", fp->method); + freelog(LOG_FATAL, "Internal error: Bad fz_fopen method: %d", + (int) fp->method); abort(); } return fp; @@ -156,7 +157,8 @@ break; default: /* Should never happen */ - freelog(LOG_FATAL, "Internal error: Bad fz_fclose method: %d", fp->method); + freelog(LOG_FATAL, "Internal error: Bad fz_fclose method: %d", + (int) fp->method); abort(); } free(fp); @@ -183,7 +185,8 @@ break; default: /* Should never happen */ - freelog(LOG_FATAL, "Internal error: Bad fz_fgets method: %d", fp->method); + freelog(LOG_FATAL, "Internal error: Bad fz_fgets method: %d", + (int) fp->method); abort(); } return retval; @@ -227,7 +230,8 @@ break; default: /* Should never happen */ - freelog(LOG_FATAL, "Internal error: Bad fz_fprintf method: %d", fp->method); + freelog(LOG_FATAL, "Internal error: Bad fz_fprintf method: %d", + (int) fp->method); abort(); } va_end(ap); @@ -256,7 +260,8 @@ break; default: /* Should never happen */ - freelog(LOG_FATAL, "Internal error: Bad fz_ferror method: %d", fp->method); + freelog(LOG_FATAL, "Internal error: Bad fz_ferror method: %d", + (int) fp->method); abort(); } return retval; @@ -293,7 +298,8 @@ break; default: /* Should never happen */ - freelog(LOG_FATAL, "Internal error: Bad fz_strerror method: %d", fp->method); + freelog(LOG_FATAL, "Internal error: Bad fz_strerror method: %d", + (int) fp->method); abort(); } return retval; Index: common/log.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/log.c,v retrieving revision 1.24 diff -u -r1.24 log.c --- common/log.c 2002/02/05 19:05:49 1.24 +++ common/log.c 2002/02/07 07:51:07 @@ -250,9 +250,9 @@ repeated++; if(repeated==next){ my_snprintf(buf, sizeof(buf), - _("last message repeated %d times"), repeated-prev); + _("last message repeated %d times"), (int)(repeated-prev)); if (repeated>2) { - cat_snprintf(buf, sizeof(buf), _(" (total %d repeats)"), repeated); + cat_snprintf(buf, sizeof(buf), _(" (total %d repeats)"), (int)repeated); } log_write(fs, prev_level, buf); prev=repeated; @@ -268,10 +268,11 @@ sz_strlcpy(buf, _("last message repeated once")); } else { my_snprintf(buf, sizeof(buf), - _("last message repeated %d times"), repeated-prev); + _("last message repeated %d times"), + (int) (repeated - prev)); } if (repeated>2) { - cat_snprintf(buf, sizeof(buf), _(" (total %d repeats)"), repeated); + cat_snprintf(buf, sizeof(buf), _(" (total %d repeats)"), (int)repeated); } log_write(fs, prev_level, buf); } Index: common/map.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/map.c,v retrieving revision 1.103 diff -u -r1.103 map.c --- common/map.c 2001/12/13 19:13:16 1.103 +++ common/map.c 2002/02/07 07:51:08 @@ -1052,10 +1052,14 @@ move_cost[]==-3 ,.. --dwp */ freelog(LOG_DEBUG, "%s (%d, %d) [%x%x%x%x%x%x%x%x]", str, x, y, - tile0->move_cost[0], tile0->move_cost[1], - tile0->move_cost[2], tile0->move_cost[3], - tile0->move_cost[4], tile0->move_cost[5], - tile0->move_cost[6], tile0->move_cost[7]); + (unsigned int) tile0->move_cost[0], + (unsigned int) tile0->move_cost[1], + (unsigned int) tile0->move_cost[2], + (unsigned int) tile0->move_cost[3], + (unsigned int) tile0->move_cost[4], + (unsigned int) tile0->move_cost[5], + (unsigned int) tile0->move_cost[6], + (unsigned int) tile0->move_cost[7]); } /*************************************************************** Index: common/packets.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/packets.c,v retrieving revision 1.171 diff -u -r1.171 packets.c --- common/packets.c 2002/02/02 08:57:37 1.171 +++ common/packets.c 2002/02/07 07:51:11 @@ -166,7 +166,7 @@ /* default for the server */ int result = 0; - freelog(LOG_DEBUG, "sending packet type=%d len=%d", data[2], len); + freelog(LOG_DEBUG, "sending packet type=%d len=%d", (int)data[2], len); if (!is_server) { pc->client.last_request_id_used = Index: common/player.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/player.c,v retrieving revision 1.73 diff -u -r1.73 player.c --- common/player.c 2002/01/09 21:48:09 1.73 +++ common/player.c 2002/02/07 07:51:11 @@ -510,7 +510,7 @@ if (type < DS_LAST) return Q_(ds_names[type]); - freelog(LOG_FATAL, "Bad diplstate_type in diplstate_text: %d", type); + freelog(LOG_FATAL, "Bad diplstate_type in diplstate_text: %d", (int)type); abort(); } Index: common/unit.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/unit.c,v retrieving revision 1.135 diff -u -r1.135 unit.c --- common/unit.c 2001/09/16 09:38:08 1.135 +++ common/unit.c 2002/02/07 07:51:12 @@ -763,8 +763,9 @@ unit_flag(punit, F_TRANSFORM)); default: - freelog(LOG_ERROR, "Unknown activity %d in can_unit_do_activity_targeted()", - activity); + freelog(LOG_ERROR, + "Unknown activity %d in can_unit_do_activity_targeted()", + (int) activity); return 0; } } @@ -911,7 +912,7 @@ } default: freelog(LOG_FATAL, "Unknown unit activity %d in unit_activity_text()", - punit->activity); + (int)punit->activity); exit(1); } return 0; Index: server/gotohand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/gotohand.c,v retrieving revision 1.128 diff -u -r1.128 gotohand.c --- server/gotohand.c 2002/02/02 15:31:55 1.128 +++ server/gotohand.c 2002/02/07 07:51:14 @@ -1466,7 +1466,7 @@ max_moves = pfrom->moves_left - (fullfuel-(turns-i)) * fullmoves; } freelog(LOG_DEBUG, "unit @@(%d,%d) may use %d moves", - pfrom->x, pfrom->y, max_moves); + (int)pfrom->x, (int)pfrom->y, max_moves); /* try to move to all of the refuel stations and the goal */ for (k=0; kturns = turns; if (pto->type == FUEL_GOAL) reached_goal = 1; - freelog(LOG_DEBUG, "insert (%i,%i) -> (%i,%i) %d, %d", pfrom->x, - pfrom->y, pto->x, pto->y, pto->turns, unit_moves_left); - + freelog(LOG_DEBUG, "insert (%i,%i) -> (%i,%i) %d, %d", + (int) pfrom->x, (int) pfrom->y, (int) pto->x, + (int) pto->y, pto->turns, unit_moves_left); } } } @@ -1506,7 +1506,7 @@ if (reached_goal) { while (pgoal->coming_from->type != FUEL_START) { pgoal = pgoal->coming_from; - freelog(LOG_DEBUG, "%i,%i", pgoal->x, pgoal->y); + freelog(LOG_DEBUG, "%i,%i", (int)pgoal->x, (int)pgoal->y); } freelog(LOG_DEBUG, "success"); } else Index: server/maphand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/maphand.c,v retrieving revision 1.94 diff -u -r1.94 maphand.c --- server/maphand.c 2002/02/02 15:31:56 1.94 +++ server/maphand.c 2002/02/07 07:51:15 @@ -794,8 +794,8 @@ { map_get_player_tile(x, y, pplayer)->seen += change; freelog(LOG_DEBUG, "%d,%d, p: %d, change %d, result %d\n", x, y, - pplayer->player_no, change, map_get_player_tile(x, y, - pplayer)->seen); + pplayer->player_no, change, + (int) map_get_player_tile(x, y, pplayer)->seen); } /*************************************************************** Index: server/meta.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/meta.c,v retrieving revision 1.39 diff -u -r1.39 meta.c --- server/meta.c 2001/12/11 16:16:47 1.39 +++ server/meta.c 2002/02/07 07:51:15 @@ -125,7 +125,7 @@ sz_strlcpy(retstr, srvarg.metaserver_addr); } else { my_snprintf(retstr, sizeof(retstr), - "%s:%d", srvarg.metaserver_addr, srvarg.metaserver_port); + "%s:%d", srvarg.metaserver_addr, (int)srvarg.metaserver_port); } return retstr; Index: server/ruleset.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/ruleset.c,v retrieving revision 1.86 diff -u -r1.86 ruleset.c --- server/ruleset.c 2002/01/21 10:47:10 1.86 +++ server/ruleset.c 2002/02/07 07:51:17 @@ -1945,7 +1945,7 @@ res = secfile_lookup_int_vec(file, &dim, "%s.advisors", sec[i]); if (dim != ADV_LAST) { freelog(LOG_FATAL, "Nation %s: number of advisors must be %d but is %d", - pl->name_plural, ADV_LAST, dim); + pl->name_plural, (int)ADV_LAST, dim); exit(1); } for ( j=0; jname, pcity->name, city_x, city_y, - pcity->city_map[city_x][city_y]); + (int)pcity->city_map[city_x][city_y]); } } } whole_map_iterate_end; Index: server/savegame.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/savegame.c,v retrieving revision 1.47 diff -u -r1.47 savegame.c --- server/savegame.c 2002/01/21 11:04:56 1.47 +++ server/savegame.c 2002/02/07 07:51:19 @@ -74,7 +74,7 @@ if(!isprint(line[x] & 0x7f)) { \ freelog(LOG_FATAL, "Trying to write invalid" \ " map data: '%c' %d", \ - line[x], line[x]); \ + line[x], (int)line[x]); \ exit(1); \ } \ } else { \ @@ -181,7 +181,7 @@ pch = strchr(hex_chars, ch); if (!pch || ch == '\0') { - freelog(LOG_FATAL, "Unknown hex value: '%c' %d", ch, ch); + freelog(LOG_FATAL, "Unknown hex value: '%c' %d", ch, (int)ch); exit(1); } return (pch - hex_chars) << (halfbyte * 4); @@ -196,7 +196,7 @@ char *pch = strchr(terrain_chars, ch); if (!pch || ch == '\0') { - freelog(LOG_FATAL, "Unknown terrain type: '%c' %d", ch, ch); + freelog(LOG_FATAL, "Unknown terrain type: '%c' %d", ch, (int)ch); exit(1); } return pch - terrain_chars; @@ -216,7 +216,8 @@ offset = strlen(buffer); for (i = 0; i < length; i++) { - sprintf(buffer + offset, "%02x ", ((unsigned char *) data)[i]); + sprintf(buffer + offset, "%02x ", + (unsigned int) (((unsigned char *) data)[i])); offset += 3; } return buffer; Index: server/settlers.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/settlers.c,v retrieving revision 1.115 diff -u -r1.115 settlers.c --- server/settlers.c 2001/12/06 11:59:07 1.115 +++ server/settlers.c 2002/02/07 07:51:20 @@ -1186,10 +1186,10 @@ freelog(LOG_DEBUG, "(%d %d) I=%+-4d O=%+-4d M=%+-4d R=%+-4d RR=%+-4d P=%+-4d N=%+-4d", i, j, - pcity->ai.irrigate[i][j], pcity->ai.transform[i][j], - pcity->ai.mine[i][j], pcity->ai.road[i][j], - pcity->ai.railroad[i][j], pcity->ai.detox[i][j], - pcity->ai.derad[i][j]); + (int)pcity->ai.irrigate[i][j], (int)pcity->ai.transform[i][j], + (int)pcity->ai.mine[i][j], (int)pcity->ai.road[i][j], + (int)pcity->ai.railroad[i][j], (int)pcity->ai.detox[i][j], + (int)pcity->ai.derad[i][j]); } /* end if we are a legal destination */ } city_map_iterate_outwards_end; } Index: server/srv_main.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v retrieving revision 1.55 diff -u -r1.55 srv_main.c --- server/srv_main.c 2002/01/23 08:58:29 1.55 +++ server/srv_main.c 2002/02/07 07:51:21 @@ -300,7 +300,7 @@ freelog(LOG_DEBUG, "environmental_upset: cause=%-4d current=%-2d level=%-2d accum=%-2d", - cause, *current, *level, *accum); + (int)cause, *current, *level, *accum); } /************************************************************************** @@ -535,7 +535,7 @@ if (server_state != RUN_GAME_STATE && server_state != GAME_OVER_STATE && type != REPORT_SERVER_OPTIONS1 && type != REPORT_SERVER_OPTIONS2) { - freelog(LOG_ERROR, "Got a report request %d before game start", type); + freelog(LOG_ERROR, "Got a report request %d before game start", (int)type); return; } Index: server/stdinhand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/stdinhand.c,v retrieving revision 1.198 diff -u -r1.198 stdinhand.c --- server/stdinhand.c 2002/01/07 21:13:07 1.198 +++ server/stdinhand.c 2002/02/07 07:51:24 @@ -914,7 +914,7 @@ return 1; default: freelog(LOG_ERROR, "Unexpected case %d in %s line %d", - op->sclass, __FILE__, __LINE__); + (int)op->sclass, __FILE__, __LINE__); return 0; } } @@ -1471,7 +1471,7 @@ match_result, _(m_pre_description(match_result)), name); freelog(LOG_ERROR, "Unexpected match_result %d (%s) for '%s'.", - match_result, m_pre_description(match_result), name); + (int)match_result, m_pre_description(match_result), name); } } @@ -1506,7 +1506,7 @@ match_result, _(m_pre_description(match_result)), name); freelog(LOG_ERROR, "Unexpected match_result %d (%s) for '%s'.", - match_result, m_pre_description(match_result), name); + (int)match_result, m_pre_description(match_result), name); } }