summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorculler <culler>2021-04-29 22:42:59 (GMT)
committerculler <culler>2021-04-29 22:42:59 (GMT)
commitdad9cd1095e2186936703566688f5e4f3b1caab8 (patch)
tree837ce1e641181544b7ec0fc5569fbb83e1513bdf
parent930d8d8113d95865a976899b150299dd238208e3 (diff)
downloadtk-dad9cd1095e2186936703566688f5e4f3b1caab8.zip
tk-dad9cd1095e2186936703566688f5e4f3b1caab8.tar.gz
tk-dad9cd1095e2186936703566688f5e4f3b1caab8.tar.bz2
Fix shadowed variable warnings.
-rw-r--r--macosx/tkMacOSXImage.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/macosx/tkMacOSXImage.c b/macosx/tkMacOSXImage.c
index 17a0df1..6964d91 100644
--- a/macosx/tkMacOSXImage.c
+++ b/macosx/tkMacOSXImage.c
@@ -530,13 +530,13 @@ CreateCGImageFromDrawableRect(
return NULL;
}
NSSize size = view.frame.size;
- NSUInteger width = size.width, height = size.height;
+ NSUInteger view_width = size.width, view_height = size.height;
NSUInteger bytesPerPixel = 4,
- bytesPerRow = bytesPerPixel * width,
+ bytesPerRow = bytesPerPixel * view_width,
bitsPerComponent = 8;
- imageData = ckalloc(height * bytesPerRow);
+ imageData = ckalloc(view_height * bytesPerRow);
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
- cg_context = CGBitmapContextCreate(imageData, width, height,
+ cg_context = CGBitmapContextCreate(imageData, view_width, view_height,
bitsPerComponent, bytesPerRow, colorSpace,
kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
CFRelease(colorSpace);