From a0d3cfb0a55a6ece2e1138afa75ea6311bd60347 Mon Sep 17 00:00:00 2001 From: "pinkerton%netscape.com" Date: Tue, 17 Apr 2001 00:38:34 +0000 Subject: [PATCH] Fix warnings and compile errors in gcc. r=saari/sr=hyatt, bug#7653 git-svn-id: svn://10.0.0.236/trunk@92473 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/gfx/src/mac/nsImageMac.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/mozilla/gfx/src/mac/nsImageMac.cpp b/mozilla/gfx/src/mac/nsImageMac.cpp index 80b72207c8f..ca5ae40322f 100644 --- a/mozilla/gfx/src/mac/nsImageMac.cpp +++ b/mozilla/gfx/src/mac/nsImageMac.cpp @@ -49,10 +49,10 @@ nsImageMac::nsImageMac() , mAlphaWidth(0) , mAlphaHeight(0) , mARowBytes(0) -, mIsTopToBottom(PR_TRUE) -, mPixelDataSize(0) , mNaturalWidth(0) , mNaturalHeight(0) +, mPixelDataSize(0) +, mIsTopToBottom(PR_TRUE) { NS_INIT_REFCNT(); @@ -177,7 +177,6 @@ nsImageMac::Init(PRInt32 aWidth, PRInt32 aHeight, PRInt32 aDepth, nsMaskRequirem if (aMaskRequirements != nsMaskRequirements_kNoMask) { CTabHandle grayRamp = nsnull; - PRInt16 mAlphaDepth = 0; switch (aMaskRequirements) { @@ -269,8 +268,9 @@ NS_IMETHODIMP nsImageMac::Draw(nsIRenderingContext &aContext, nsDrawingSurface a NS_ASSERTION(destPixels, "No dest pixels!"); // can only do this if we are NOT printing - nsCOMPtr theDevContext; - aContext.GetDeviceContext(*getter_AddRefs(theDevContext)); + nsCOMPtr dc; // (this screams for a private interface, sigh! + aContext.GetDeviceContext(*getter_AddRefs(dc)); + nsDeviceContextMac* theDevContext = NS_REINTERPRET_CAST(nsDeviceContextMac*, dc.get()); if (theDevContext->IsPrinter()) // we are printing { if (!mMaskBitsHandle) @@ -648,7 +648,6 @@ void nsImageMac::ClearGWorld(GWorldPtr theGWorld) PixMapHandle thePixels; GWorldPtr curPort; GDHandle curDev; - OSErr err = noErr; thePixels = ::GetGWorldPixMap(theGWorld); ::GetGWorld(&curPort, &curDev);