From bfb21255e3bbab36083e9410071dcde6cba8c85a Mon Sep 17 00:00:00 2001 From: James Cook Date: Sat, 7 Apr 2007 03:11:14 +0000 Subject: 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(-) (limited to 'indra/llimage/llimagedxt.cpp') diff --git a/indra/llimage/llimagedxt.cpp b/indra/llimage/llimagedxt.cpp index 1b6ce65274..f47dd29930 100644 --- a/indra/llimage/llimagedxt.cpp +++ b/indra/llimage/llimagedxt.cpp @@ -276,7 +276,10 @@ BOOL LLImageDXT::getMipData(LLPointer& 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; -- cgit v1.2.3