X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2059576f48e26fd140906df607d571e362b53ab9..5cbb4a59ce0ae0ac4e3ed4d86d4338a497ceeab2:/src/osx/core/glgrab.cpp?ds=sidebyside

diff --git a/src/osx/core/glgrab.cpp b/src/osx/core/glgrab.cpp
index 74644b45c7..669f2ba6c4 100644
--- a/src/osx/core/glgrab.cpp
+++ b/src/osx/core/glgrab.cpp
@@ -39,6 +39,7 @@
 #import <OpenGL/OpenGL.h>
 #import <OpenGL/gl.h>
 
+#include "wx/osx/core/private.h"
 #include "wx/osx/private/glgrab.h"
 
 extern CGColorSpaceRef wxMacGetGenericRGBColorSpace();
@@ -114,7 +115,6 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect)
     void * data;
     long bytewidth;
     GLint width, height;
-    long bytes;
 
     CGLContextObj    glContextObj;
     CGLPixelFormatObj pixelFormatObj ;
@@ -156,7 +156,6 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect)
 
     bytewidth = width * 4; // Assume 4 bytes/pixel for now
     bytewidth = (bytewidth + 3) & ~3; // Align to 4 bytes
-    bytes = bytewidth * height; // width * height
 
     /* Build bitmap context */
     data = malloc(height * bytewidth);