summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-02-20 19:34:53 +0000
committersmatz <smatz@openttd.org>2008-02-20 19:34:53 +0000
commita47b4631ea6375e72e46ed24b985ed486ed4c0f1 (patch)
treef2fa9ddef340dd6eaba201b14c9762a368b86d63 /src
parent767e1cc37ec00af331939bc5a74f1a60b22a1b22 (diff)
downloadopenttd-a47b4631ea6375e72e46ed24b985ed486ed4c0f1.tar.xz
(svn r12201) -Fix (r12060): compilation warnings - uninitialized variable when compiling with assert disabled
Diffstat (limited to 'src')
-rw-r--r--src/town_cmd.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 2cc8d0da5..8e809520c 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -1619,7 +1619,12 @@ HouseZonesBits GetTownRadiusGroup(const Town* t, TileIndex tile)
*/
static inline void ClearMakeHouseTile(TileIndex tile, TownID tid, byte counter, byte stage, HouseID type, byte random_bits)
{
- CommandCost cc = DoCommand(tile, 0, 0, DC_EXEC | DC_AUTO | DC_NO_WATER, CMD_LANDSCAPE_CLEAR);
+ #if !defined(NDEBUG) || defined(WITH_ASSERT)
+ CommandCost cc =
+ #endif /* !defined(NDEBUG) || defined(WITH_ASSERT) */
+
+ DoCommand(tile, 0, 0, DC_EXEC | DC_AUTO | DC_NO_WATER, CMD_LANDSCAPE_CLEAR);
+
assert(CmdSucceeded(cc));
MakeHouseTile(tile, tid, counter, stage, type, random_bits);