Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: [RFC] [Patch] Unused parameter
Home

[Freeciv-Dev] Re: [RFC] [Patch] Unused parameter

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx, freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [RFC] [Patch] Unused parameter
From: Raahul Kumar <raahul_da_man@xxxxxxxxx>
Date: Tue, 5 Feb 2002 08:04:54 -0800 (PST)

 @@ -36,7 +36,7 @@
>   if choice is A_NONE this advisor doesn't want any tech researched at
>   the moment
>  ***********************************************************************/
> -void military_advisor_choose_tech(struct player *pplayer,
> +void military_advisor_choose_tech( /*@unused@ */ struct player *pplayer,
>                                 struct ai_choice *choice)
>  {
>    choice->choice = A_N
--- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> 
> The attached patch tags unused parameter with "/*@unused@*/" which
> splint understands. This patch could act as a discussion base and to
> decide case by case what should happen with the parameter: remove it
> or keep it. For example the parameters in create_improvements_list,
> handle_move_unit and notify_about_incoming_packet should be
> removed. create_help_page should be removed altogether. In some other
> cases (get_total_attack_power, build_*_time) it indicates some
> flexibility which was never used. Should this flexibility be kept?
> 
>       Raimar
> 
> -- 
>  email: rf13@xxxxxxxxxxxxxxxxx


> -void attitude_advisor_choose_tech(struct player *pplayer, 
> +void attitude_advisor_choose_tech( /*@unused@ */ struct player *pplayer,
>                                 struct ai_choice *choice)

I vote for getting rid of all the pplayer structs. There's no advantage to
keeping it in the AI code. 






__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com


[Prev in Thread] Current Thread [Next in Thread]