[Freeciv-Dev] Re: PATCH to FreeCiv CVS-Snapshot-Jul-19
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
At 2000/07/19 10:19 , Dirk Stoecker wrote:
>
>I removed some warnings, which are produced by SAS-C compiler. This creates a
>nicer compiler run and normally also better code.
>
>Some explicit casts added for function return:
>common/map.c tile_is_known
>common/shared.c cat_snprintf
>server/console.c con_dump
>server/gotohand.c find_air_first_destination
>server/maphand.c map_get_known
>server/maphand.c map_get_sent
>
>Macro invocation calls function multiple (macro/arguments expanded):
>ai/aitech.c 201
>server/plrhand.c 1773
>server/mapgen.c 141
>server/mapgen.c 166 make_forest
>--> The indentation suggested behaviour different to what was done and
wanted.
>--> I corrected the intendation.
>
>Others:
>server/civserver.c update_diplomatics --> added void as argument list
>server/cityhand.c "package_dumb_city" --> added static keyword to
declaration also
>server/maphand.c "player_tile_init" --> added static keyword to
declaration also
>server/maphand.c "give_tile_info_from_player_to_player" --> static keyword
>server/unitfunc.c "sentry_transported_idle_units" --> static keyword
>
>Some dead assignments in already changed modules (removed):
>ai/aitech.c 149 "bestdist"
>ai/aitech.c 102 "tech"
>server/mapgen.c 183 "forestsize"
>server/maphand.c 292/372 "ptile"
>server/civserver.c 169 "option"
>server/civserver.c 1935 "ptile"
>--> There are much more of them :-)
>
>In common/log.h and server/console.c:
>Removed logdebug_suppress_warning and added LOG_FREELOG_UNUSED define check.
>This removes the creation of the 2 static functions logdebug_check and
freelog
>totally, when they are unused. This removes the "static function freelog
>unreachable" warning for non-GCC compilers (and shortens binary).
I cleaned-up this clean-up patch :) I removed several changes I didn't
think appropriate. (Especially, I believe the "bestdist" removal
introduced a bug.) Attached is the results.
sdi-1.diff
Description: Text document
jjm
- [Freeciv-Dev] Re: PATCH to FreeCiv CVS-Snapshot-Jul-19,
Jeff Mallatt <=
|
|