Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2000:
[Freeciv-Dev] Easy Optimizing Patch for aiunit.c
Home

[Freeciv-Dev] Easy Optimizing Patch for aiunit.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Easy Optimizing Patch for aiunit.c
From: Dirk Stoecker <stoecker@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 2 Aug 2000 22:21:11 +0200 (MET DST)

Hi,

I removed a larger set of compiler warnings for file 
ai/aiunit.c (CVS of 02.08.2000):

/ai/aiunit.c 774 Warning 304: dead assignment eliminated "fu"

Removed variable, as it is unused.

/ai/aiunit.c 830 Warning 304: dead assignment eliminated "d_val"
/ai/aiunit.c 534 Warning 304: dead assignment eliminated "val"
/ai/aiunit.c 1036 Warning 304: dead assignment eliminated "def"
/ai/aiunit.c 1036 Warning 304: dead assignment eliminated "d"
/ai/aiunit.c 2096 Warning 304: dead assignment eliminated "ptres"

Removed assignments.

/ai/aiunit.c 872 Warning 317: possibly uninitialized variable "bx"
/ai/aiunit.c 872 Warning 317: possibly uninitialized variable "by"
/ai/aiunit.c 873 Warning 317: possibly uninitialized variable "bx"
/ai/aiunit.c 874 Warning 317: possibly uninitialized variable "by"

Added assignments to 0.

/ai/aiunit.c 1180 Warning 304: dead assignment eliminated "bestb0"
/ai/aiunit.c 1180 Warning 304: dead assignment eliminated "dd"
/ai/aiunit.c 1180 Warning 304: dead assignment eliminated "cc"
/ai/aiunit.c 1180 Warning 304: dead assignment eliminated "bb"
/ai/aiunit.c 1180 Warning 304: dead assignment eliminated "aa"
/ai/aiunit.c 1373 Warning 304: dead assignment eliminated "dd"
/ai/aiunit.c 1373 Warning 304: dead assignment eliminated "cc"
/ai/aiunit.c 1373 Warning 304: dead assignment eliminated "bb"
/ai/aiunit.c 1373 Warning 304: dead assignment eliminated "aa"
/ai/aiunit.c 1374 Warning 304: dead assignment eliminated "bestb0"
/ai/aiunit.c 1381 Warning 304: dead assignment eliminated "dd"
/ai/aiunit.c 1381 Warning 304: dead assignment eliminated "cc"
/ai/aiunit.c 1381 Warning 304: dead assignment eliminated "bb"
/ai/aiunit.c 1381 Warning 304: dead assignment eliminated "aa"
/ai/aiunit.c 1382 Warning 304: dead assignment eliminated "bestb0"
/ai/aiunit.c 1425 Warning 304: dead assignment eliminated "dd"
/ai/aiunit.c 1425 Warning 304: dead assignment eliminated "cc"
/ai/aiunit.c 1425 Warning 304: dead assignment eliminated "bb"
/ai/aiunit.c 1425 Warning 304: dead assignment eliminated "aa"
/ai/aiunit.c 1426 Warning 304: dead assignment eliminated "bestb0"

Moved all accesses to these variables into #ifdef DEBUG as these are
needed for debugging only.

Ciao
 ____  _ _  ____  _ _    _ _  ____
|    |  |  |    |  | \  / |  |    | the cool Gremlin from Bischofswerda
|  __   |   ____|  |  \/  |  |    | WWW: http://home.pages.de/~stoecker/
|    |  |  |       |      |  |    | PGP key available on www page.
|____| _|_ |____| _|_    _|_ |____| I hope AMIGA never ends to make fun!

************************************************************************
* snail-mail: Dirk Stoecker              * e-mail:                     *
*             Geschwister-Scholl-Str. 10 * stoecker@xxxxxxxxxxxxxx     *
*             01877 Bischofswerda        * phone:                      *
*             GERMANY                    * GERMANY +49 (0)3594/706666  *
************************************************************************

Attachment: aiunit.diff.gz
Description: Binary data


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Easy Optimizing Patch for aiunit.c, Dirk Stoecker <=