[Glamor] [PATCH] Remove a compilation warning when converting a texture number to EGLClientBuffer

Axel Davy axel.davy at ens.fr
Sun Dec 8 04:02:30 PST 2013


Signed-off-by: Axel Davy <axel.davy at ens.fr>
---
CWARNFLAGS can contains -Werror=int-to-pointer-cast.
To remove the warning, add -Wno-int-to-pointer-cast.

 src/Makefile.am  | 2 +-
 src/glamor_egl.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 50cfe97..b82504f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -13,7 +13,7 @@ endif
 AM_CPPFLAGS = \
 	$(XORG_INCS)
 
-AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS) $(DIX_CFLAGS) $(LIBDRM_CFLAGS)
+AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS) $(DIX_CFLAGS) $(LIBDRM_CFLAGS) -Wno-int-to-pointer-cast
 
 libglamor_la_LDFLAGS = -version-info 0:0:0
 
diff --git a/src/glamor_egl.c b/src/glamor_egl.c
index bf0db3a..27fc6a8 100644
--- a/src/glamor_egl.c
+++ b/src/glamor_egl.c
@@ -453,7 +453,8 @@ int glamor_egl_dri3_fd_name_from_tex (ScreenPtr screen,
 		image = glamor_egl->egl_create_image_khr(glamor_egl->display,
 							 glamor_egl->context,
 							 EGL_GL_TEXTURE_2D_KHR,
-							 tex, attribs);
+							 (EGLClientBuffer)tex,
+							 attribs);
 		if (image == EGL_NO_IMAGE_KHR)
 			goto failure;
 
-- 
1.8.1.2



More information about the Glamor mailing list