Author: cazfi Date: Mon Nov 21 05:52:44 2016 New Revision: 34600 URL: http://svn.gna.org/viewcvs/freeciv?rev=34600&view=rev Log: Fixed compile with clang-3.9.
See bug #25314 Modified: branches/S2_5/client/agents/agents.c Modified: branches/S2_5/client/agents/agents.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/agents/agents.c?rev=34600&r1=34599&r2=34600&view=diff ============================================================================== --- branches/S2_5/client/agents/agents.c (original) +++ branches/S2_5/client/agents/agents.c Mon Nov 21 05:52:44 2016 @@ -119,9 +119,9 @@ agents.calls list, add the call to this list. Maintains the list in a sorted order. ***********************************************************************/ -static void enqueue_call(struct my_agent *agent, - enum oct type, - enum callback_type cb_type, ...) +static void enqueue_call(enum oct type, + enum callback_type cb_type, + struct my_agent *agent, ...) { va_list ap; struct call *pcall2; @@ -129,7 +129,7 @@ const struct tile *ptile; bool added = FALSE; - va_start(ap, cb_type); + va_start(ap, agent); if (client_is_observer()) { return; @@ -487,7 +487,7 @@ continue; } if (agent->agent.turn_start_notify) { - enqueue_call(agent, OCT_NEW_TURN, CB_LAST); + enqueue_call(OCT_NEW_TURN, CB_LAST, agent); } } /* @@ -519,7 +519,7 @@ continue; } if (agent->agent.unit_callbacks[CB_CHANGE]) { - enqueue_call(agent, OCT_UNIT, CB_CHANGE, punit->id); + enqueue_call(OCT_UNIT, CB_CHANGE, agent, punit->id); } } call_handle_methods(); @@ -544,7 +544,7 @@ continue; } if (agent->agent.unit_callbacks[CB_NEW]) { - enqueue_call(agent, OCT_UNIT, CB_NEW, punit->id); + enqueue_call(OCT_UNIT, CB_NEW, agent, punit->id); } } @@ -570,7 +570,7 @@ continue; } if (agent->agent.unit_callbacks[CB_REMOVE]) { - enqueue_call(agent, OCT_UNIT, CB_REMOVE, punit->id); + enqueue_call(OCT_UNIT, CB_REMOVE, agent, punit->id); } } @@ -596,7 +596,7 @@ continue; } if (agent->agent.city_callbacks[CB_CHANGE]) { - enqueue_call(agent, OCT_CITY, CB_CHANGE, pcity->id); + enqueue_call(OCT_CITY, CB_CHANGE, agent, pcity->id); } } @@ -622,7 +622,7 @@ continue; } if (agent->agent.city_callbacks[CB_NEW]) { - enqueue_call(agent, OCT_CITY, CB_NEW, pcity->id); + enqueue_call(OCT_CITY, CB_NEW, agent, pcity->id); } } @@ -648,7 +648,7 @@ continue; } if (agent->agent.city_callbacks[CB_REMOVE]) { - enqueue_call(agent, OCT_CITY, CB_REMOVE, pcity->id); + enqueue_call(OCT_CITY, CB_REMOVE, agent, pcity->id); } } @@ -673,7 +673,7 @@ continue; } if (agent->agent.tile_callbacks[CB_REMOVE]) { - enqueue_call(agent, OCT_TILE, CB_REMOVE, ptile); + enqueue_call(OCT_TILE, CB_REMOVE, agent, ptile); } } @@ -697,7 +697,7 @@ continue; } if (agent->agent.tile_callbacks[CB_CHANGE]) { - enqueue_call(agent, OCT_TILE, CB_CHANGE, ptile); + enqueue_call(OCT_TILE, CB_CHANGE, agent, ptile); } } @@ -721,7 +721,7 @@ continue; } if (agent->agent.tile_callbacks[CB_NEW]) { - enqueue_call(agent, OCT_TILE, CB_NEW, ptile); + enqueue_call(OCT_TILE, CB_NEW, agent, ptile); } } @@ -776,7 +776,7 @@ struct my_agent *agent = agent_by_name(name_of_calling_agent); fc_assert_ret(agent->agent.unit_callbacks[CB_CHANGE] != NULL); - enqueue_call(agent, OCT_UNIT, CB_CHANGE, punit->id); + enqueue_call(OCT_UNIT, CB_CHANGE, agent, punit->id); call_handle_methods(); } @@ -789,7 +789,7 @@ struct my_agent *agent = agent_by_name(name_of_calling_agent); fc_assert_ret(agent->agent.city_callbacks[CB_CHANGE] != NULL); - enqueue_call(agent, OCT_CITY, CB_CHANGE, pcity->id); + enqueue_call(OCT_CITY, CB_CHANGE, agent, pcity->id); call_handle_methods(); } _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits