From 6b755174bd45ac0d44052b2eee2609710fabe1fb Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 5 Aug 2010 11:57:06 +0000 Subject: SWORD25: Fixed some potentially uninitialised variable warnings svn-id: r53212 --- engines/sword25/math/geometry_script.cpp | 2 +- engines/sword25/math/region.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/sword25/math/geometry_script.cpp b/engines/sword25/math/geometry_script.cpp index 7a0fcd8188..f01f977f4a 100644 --- a/engines/sword25/math/geometry_script.cpp +++ b/engines/sword25/math/geometry_script.cpp @@ -202,7 +202,7 @@ static unsigned int TableRegionToRegion(lua_State *L, const char *ClassName) { return 0; } - unsigned int RegionHandle; + unsigned int RegionHandle = 0; if (!strcmp(ClassName, REGION_CLASS_NAME)) { RegionHandle = BS_Region::Create(BS_Region::RT_REGION); } else if (!strcmp(ClassName, WALKREGION_CLASS_NAME)) { diff --git a/engines/sword25/math/region.cpp b/engines/sword25/math/region.cpp index 4999a4340e..bab5381990 100644 --- a/engines/sword25/math/region.cpp +++ b/engines/sword25/math/region.cpp @@ -60,7 +60,7 @@ BS_Region::BS_Region(BS_InputPersistenceBlock &Reader, unsigned int Handle) : m_ // ----------------------------------------------------------------------------- unsigned int BS_Region::Create(REGION_TYPE Type) { - BS_Region * RegionPtr; + BS_Region * RegionPtr = NULL; switch (Type) { case RT_REGION: RegionPtr = new BS_Region(); @@ -85,7 +85,7 @@ unsigned int BS_Region::Create(BS_InputPersistenceBlock & Reader, unsigned int H Reader.Read(Type); // Depending on the type, create a new BS_Region or BS_WalkRegion object - BS_Region * RegionPtr; + BS_Region *RegionPtr = NULL; if (Type == RT_REGION) { RegionPtr = new BS_Region(Reader, Handle); } else if (Type == RT_WALKREGION) { -- cgit v1.2.3