Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] (PR#2566) PATCH: clean up handle_upgrade_unittype_request
Home

[Freeciv-Dev] (PR#2566) PATCH: clean up handle_upgrade_unittype_request

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Erik.Sigra@xxxxxxxxxxxxxx
Cc: freeciv@xxxxxxx
Subject: [Freeciv-Dev] (PR#2566) PATCH: clean up handle_upgrade_unittype_request
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Wed, 18 Dec 2002 23:54:40 -0800
Reply-to: rt@xxxxxxxxxxxxxx

[guest - Fri Dec 13 17:59:34 2002]:

> This patch cleans up the procedure handle_upgrade_unittype_request. Of 
> course the behaviour is not changed. The improvements are:  

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I./../common -I./../ai -I../intl    -g
-Wall -Werror -Wpointer-arith -Wcast-align -Wmissing-prototypes
-Wmissing-declarations
-O3 -c `test -f 'unithand.c' || echo './'`unithand.c
cc1: warnings being treated as errors
unithand.c: In function `handle_upgrade_unittype_request':
unithand.c:163: warning: passing arg 1 of `can_upgrade_unittype'
discards qualifiers from pointer target type
unithand.c:169: warning: passing arg 1 of `unit_upgrade_price' discards
qualifiers from pointer target type
unithand.c:174: warning: passing arg 1 of `conn_list_do_buffer' discards
qualifiers from pointer target type
unithand.c:175: warning: passing arg 2 of `genlist_iterator_init'
discards qualifiers from pointer target type
unithand.c:182: warning: assignment of read-only member `gold'
unithand.c:188: warning: passing arg 1 of `conn_list_do_unbuffer'
discards qualifiers from pointer target type
unithand.c:196: warning: passing arg 1 of `send_player_info' discards
qualifiers from pointer target type
unithand.c:196: warning: passing arg 2 of `send_player_info' discards
qualifiers from pointer target type

So until/unless the underlying functions are also changed it is no good
to add lots of 'const' qualifiers here.

jason



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