Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2002:
[Freeciv-Dev] Re: unused code (PR#2146)
Home

[Freeciv-Dev] Re: unused code (PR#2146)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Cc: Freeciv Development List <freeciv-dev@xxxxxxxxxxx>, Freeciv Bugs/Patch Tracking <bugs@xxxxxxxxxxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: unused code (PR#2146)
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Wed, 9 Oct 2002 05:53:40 -0700

On Wed, Oct 09, 2002 at 03:19:55AM -0700, Raimar Falke wrote:
> On Tue, Oct 08, 2002 at 04:05:04PM +0100, Gregory Berkolaiko wrote:
> > On Tue, 8 Oct 2002, Raimar Falke wrote:
> > 
> > > On Tue, Oct 08, 2002 at 02:21:24PM +0100, Gregory Berkolaiko wrote:
> > > > Good work, Sylvain!
> > > > 
> > > > I made a patch to implement your comments.  Please check if it's 
> > > > alright.  
> > > > You are very much encouraged not only to spot bugs (which you are very
> > > > good at), but to submit fixes for them.  In case you do not understand
> > > > what I am talking about, please have a look at
> > > >         http://www.freeciv.org/contribute.html
> > > 
> > > We have other cases where parameter of functions aren't used. Splint
> > > and gcc will give you a full list of all the cases. Removing isn't the
> > > only option. The other changes are ok.
> > 
> > What do you mean by "removing isn't the only option"?
> 
> Both gcc and splint offer ways to specify that the parameter is
> unused. In some cases it is needed because you have to implement a
> certain function prototype.
> 
> > What is the general policy on that, let it stay this way?
> 
> There no general policy (yet). I will try to create a list with splint
> so that we know about what are we discussing.

And here is the list:

common/combat.c: (in function get_total_attack_power)
common/combat.c:311:64: Parameter defender not used
common/map.c: (in function map_build_rail_time)
common/map.c:736:29: Parameter x not used
common/map.c:736:36: Parameter y not used
common/map.c: (in function map_build_airbase_time)
common/map.c:744:32: Parameter x not used
common/map.c:744:39: Parameter y not used
common/map.c: (in function map_build_fortress_time)
common/map.c:752:33: Parameter x not used
common/map.c:752:40: Parameter y not used
common/map.c: (in function map_clean_pollution_time)
common/map.c:760:34: Parameter x not used
common/map.c:760:41: Parameter y not used
common/map.c: (in function map_clean_fallout_time)
common/map.c:768:32: Parameter x not used
common/map.c:768:39: Parameter y not used
common/netintf.c: (in function my_nonblock)
common/netintf.c:133:22: Parameter sockfd not used
common/netintf.c: (in function fc_lookup_host)
common/support.c: (in function my_gethostname)
common/support.c:391:26: Parameter buf not used
common/support.c:391:38: Parameter len not used
common/timing.c: (in function usleep_since_timer_start)
common/timing.c:383:45: Parameter t not used
common/unittype.c: (in function unit_upgrade_price)
common/unittype.c:316:39: Parameter pplayer not used

server/barbarian.c: (in function unleash_barbarians)
server/barbarian.c:180:40: Parameter victim not used
server/diplhand.c: (in function handle_diplomacy_remove_clause)
server/diplhand.c:400:52: Parameter pplayer not used
server/diplhand.c: (in function handle_diplomacy_create_clause)
server/diplhand.c:427:52: Parameter pplayer not used
server/diplhand.c: (in function handle_diplomacy_init)
server/diplhand.c:518:43: Parameter pplayer not used
server/mapgen.c: (in function is_cold)
server/mapgen.c:1443:25: Parameter x not used
server/settlers.c: (in function ai_manage_settler)
server/settlers.c:425:39: Parameter pplayer not used
server/settlers.c: (in function consider_settler_action)
server/settlers.c:804:52: Parameter pplayer not used
server/stdinhand.c: (in function open_metaserver_connection)
server/stdinhand.c:1501:59: Parameter caller not used
server/stdinhand.c: (in function close_metaserver_connection)
server/stdinhand.c:1513:60: Parameter caller not used
server/stdinhand.c: (in function rename_player)
server/stdinhand.c:1821:60: Parameter arg not used
server/stdinhand.c: (in function write_command)
server/stdinhand.c:1944:46: Parameter caller not used
server/unittools.c: (in function unit_restore_movepoints)
server/unittools.c:596:52: Parameter pplayer not used

ai/advattitude.c: (in function attitude_advisor_choose_tech)
ai/advattitude.c:27:50: Parameter pplayer not used
ai/advdomestic.c: (in function ai_eval_threat_sea)
ai/advdomestic.c:74:68: Parameter pcity not used
ai/advforeign.c: (in function foreign_advisor_choose_tech)
ai/advforeign.c:27:49: Parameter pplayer not used
ai/advisland.c: (in function island_adjust_build_choice)
ai/advisland.c:25:48: Parameter pplayer not used
ai/advisland.c:26:35: Parameter advisor not used
ai/advmilitary.c: (in function military_advisor_choose_tech)
ai/advmilitary.c:41:50: Parameter pplayer not used
ai/advmilitary.c: (in function ai_reevaluate_building)
ai/advmilitary.c:296:49: Parameter pcity not used
ai/advscience.c: (in function science_advisor_choose_tech)
ai/advscience.c:27:49: Parameter pplayer not used
ai/advtrade.c: (in function trade_advisor_choose_tech)
ai/advtrade.c:27:47: Parameter pplayer not used
ai/aiunit.c: (in function ai_military_gohome)
ai/aiunit.c:1568:47: Parameter pplayer not used

client/audio_none.c: (in function my_play)
client/audio_none.c:50:62: Parameter fullpath not used
client/audio_none.c:51:12: Parameter repeat not used
client/civclient.c: (in function dealloc_id)
client/civclient.c:716:21: Parameter id not used
client/packhand.c: (in function handle_city_packet_common)
client/packhand.c:459:56: Parameter investigate not used
client/tilespec.c: (in function fill_tile_sprite_array_iso)
client/tilespec.c:1112:30: Parameter citymode not used
client/agents/cma_core.c: (in function calc_fitness)
client/agents/cma_core.c:971:39: Parameter pcity not used

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx


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