From 3b967bf8397e69bc3437a6c6a071516cba20702e Mon Sep 17 00:00:00 2001 From: culler Date: Sun, 23 Aug 2020 14:28:05 +0000 Subject: Address compiler warnings. --- macosx/tkMacOSXImage.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c index 48ed06d..d4dcc78 100644 --- a/macosx/tkMacOSXImage.c +++ b/macosx/tkMacOSXImage.c @@ -545,7 +545,6 @@ CreateCGImageFromDrawableRect( CGImageRelease(cg_image); } } else if (TkMacOSXDrawableView(mac_drawable) != NULL) { - TKContentView *tkview = (TKContentView *)view; /* * Convert Tk top-left to NSView bottom-left coordinates. @@ -559,8 +558,7 @@ CreateCGImageFromDrawableRect( /* * Attempt to copy from the view to a bitmapImageRep. If the view does * not have a valid CGContext, doing this will silently corrupt memory - * and make a big mess. So, in that case, we mark the view as needing - * display and return NULL. + * and make a big mess. So, in that case, we just return NULL. */ if (view == [NSView focusView]) { @@ -570,7 +568,6 @@ CreateCGImageFromDrawableRect( CFRelease(bitmapRep); } else { TkMacOSXDbgMsg("No CGContext - cannot copy from screen to bitmap."); - [tkview addTkDirtyRect:[tkview bounds]]; result = NULL; } } else { @@ -663,7 +660,7 @@ XGetImage( if (cgImage) { bitmapRep = [NSBitmapImageRep alloc]; [bitmapRep initWithCGImage:cgImage]; - [cgImage release]; + CFRelease(cgImage); } else { TkMacOSXDbgMsg("XGetImage: Failed to construct CGImage"); return NULL; @@ -750,7 +747,6 @@ XCopyArea( { TkMacOSXDrawingContext dc; MacDrawable *srcDraw = (MacDrawable *) src; - NSBitmapImageRep *bitmapRep = NULL; CGImageRef img = NULL; CGRect bounds, srcRect, dstRect; -- cgit v0.12