Author: cazfi Date: Fri May 15 23:13:27 2015 New Revision: 29094 URL: http://svn.gna.org/viewcvs/freeciv?rev=29094&view=rev Log: Avoid compiler warning on optimization level -O3
See bug #23587 Modified: branches/S2_6/common/unittype.c Modified: branches/S2_6/common/unittype.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/unittype.c?rev=29094&r1=29093&r2=29094&view=diff ============================================================================== --- branches/S2_6/common/unittype.c (original) +++ branches/S2_6/common/unittype.c Fri May 15 23:13:27 2015 @@ -363,14 +363,15 @@ static void unit_state_action_cache_set(struct unit_type *putype) { struct requirement req; + int uidx = utype_index(putype); /* The unit is not yet known to be allowed to perform any actions no * matter what its unit state is. */ action_iterate(action_id) { - BV_CLR_ALL(ustate_act_cache[utype_index(putype)][action_id]); + BV_CLR_ALL(ustate_act_cache[uidx][action_id]); } action_iterate_end; - BV_CLR_ALL(ustate_act_cache[utype_index(putype)][ACTION_ANY]); - BV_CLR_ALL(ustate_act_cache[utype_index(putype)][ACTION_HOSTILE]); + BV_CLR_ALL(ustate_act_cache[uidx][ACTION_ANY]); + BV_CLR_ALL(ustate_act_cache[uidx][ACTION_HOSTILE]); if (!is_actor_unit_type(putype)) { /* Not an actor unit. */ _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits