From bfb21255e3bbab36083e9410071dcde6cba8c85a Mon Sep 17 00:00:00 2001
From: James Cook <james@lindenlab.com>
Date: Sat, 7 Apr 2007 03:11:14 +0000
Subject: [PATCH] Fixed Mac deployment compiler warning (uninitialized memory
 read, but in unused code).  Reviewed with Steve long ago.

---
 indra/llimage/llimagedxt.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/indra/llimage/llimagedxt.cpp b/indra/llimage/llimagedxt.cpp
index 1b6ce652745..f47dd29930c 100644
--- a/indra/llimage/llimagedxt.cpp
+++ b/indra/llimage/llimagedxt.cpp
@@ -276,7 +276,10 @@ BOOL LLImageDXT::getMipData(LLPointer<LLImageRaw>& raw, S32 discard)
 		llerrs << "Request for invalid discard level" << llendl;
 	}
 	U8* data = getData() + getMipOffset(discard);
-	S32 width, height;
+	// I'm not sure these are the correct initial values for height and width,
+	// but previously they were being used uninitialized. JC
+	S32 width = raw->getWidth();
+	S32 height = raw->getHeight();
 	calcDiscardWidthHeight(discard, mFileFormat, width, height);
 	raw = new LLImageRaw(data, width, height, getComponents());
 	return TRUE;
-- 
GitLab