summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Versace <chad@kiwitree.net>2017-05-31 15:56:37 -0700
committerChad Versace <chad@kiwitree.net>2017-05-31 15:56:37 -0700
commit4d35528554e2df3b75176786213da6366b0573ed (patch)
tree3b1fe0d50e290e65b5113d004da999849b523ea2
parentc53456d19a79aa6165f10ba9057e8bf7ab42952d (diff)
downloadmesa-demos-pu.zip
mesa-demos-pu.tar.xz
xeglgears: Fix -Wint-to-pointer-castpu
Cast the GLuint to uintptr_t before EGLClientBuffer. Fixes below warning: xeglgears.c:919:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (EGLClientBuffer) color_rb, NULL);
-rw-r--r--src/egl/opengl/xeglgears.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/egl/opengl/xeglgears.c b/src/egl/opengl/xeglgears.c
index 866b89a..e325771 100644
--- a/src/egl/opengl/xeglgears.c
+++ b/src/egl/opengl/xeglgears.c
@@ -36,6 +36,7 @@
#define EGL_EGLEXT_PROTOTYPES
#include <math.h>
+#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -916,7 +917,7 @@ main(int argc, char *argv[])
#ifdef EGL_KHR_image
eman->image = eglCreateImageKHR_func(eman->dpy, eman->ctx,
EGL_GL_RENDERBUFFER_KHR,
- (EGLClientBuffer) color_rb, NULL);
+ (EGLClientBuffer) (uintptr_t) color_rb, NULL);
#else
fprintf(stderr, "EGL_KHR_image not found at compile time.\n");
#endif