[Piglit] [PATCH] egl_mesa_platform_surfaceless: fix compilation warning

Juan A. Suarez Romero jasuarez at igalia.com
Fri Jun 30 10:18:50 UTC 2017


Fixes

/build/piglit/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c:94:30:
warning: incompatible pointer to integer conversion passing 'void *' to
parameter of type 'NativeWindowType' (aka 'unsigned long')
[-Wint-conversion]
                                              /*native_window*/ NULL,
                                                                ^~~~
/usr/lib/llvm-3.8/bin/../lib/clang/3.8.1/include/stddef.h:105:16: note:
expanded from macro 'NULL'
               ^~~~~~~~~~
/build/piglit/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c:125:30:
warning: incompatible pointer to integer conversion passing 'void *' to
parameter of type 'NativePixmapType' (aka 'unsigned long')
[-Wint-conversion]
                                              /*native_window*/ NULL,
                                                                ^~~~
/usr/lib/llvm-3.8/bin/../lib/clang/3.8.1/include/stddef.h:105:16: note:
expanded from macro 'NULL'
               ^~~~~~~~~~
2 warnings generated.

Signed-off-by: Juan A. Suarez Romero <jasuarez at igalia.com>
---
 .../egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c b/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
index 264ed71..9c8ef31 100644
--- a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
+++ b/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
@@ -91,7 +91,7 @@ test_create_window(void *test_data)
 	test_setup(&dpy);
 
 	surf = peglCreatePlatformWindowSurfaceEXT(dpy, EGL_NO_CONFIG_KHR,
-					      /*native_window*/ NULL,
+					      (NativeWindowType) NULL,
 					      /*attrib_list*/ NULL);
 	if (surf) {
 		printf("eglCreatePlatformWindowSurface incorrectly succeeded\n");
@@ -122,7 +122,7 @@ test_create_pixmap(void *test_data)
 	test_setup(&dpy);
 
 	surf = peglCreatePlatformPixmapSurfaceEXT(dpy, EGL_NO_CONFIG_KHR,
-					      /*native_window*/ NULL,
+					      (NativeWindowType) NULL,
 					      /*attrib_list*/ NULL);
 	if (surf) {
 		printf("eglCreatePlatformPixmapSurface incorrectly succeeded\n");
-- 
2.9.4



More information about the Piglit mailing list