[Piglit] [PATCH] egl_mesa_platform_surfaceless: fix compilation warning

Juan A. Suarez Romero jasuarez at igalia.com
Mon Jul 10 15:04:15 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.

v2: change function pointer declaration (Emil)

Signed-off-by: Juan A. Suarez Romero <jasuarez at igalia.com>
---
 .../egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c   | 6 +++---
 1 file changed, 3 insertions(+), 3 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..b6f239a 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
@@ -29,9 +29,9 @@
  * Use prefix 'pegl' (piglit egl) instead of 'egl' to avoid collisions with
  * prototypes in eglext.h. */
 EGLSurface (*peglCreatePlatformPixmapSurfaceEXT)(EGLDisplay display, EGLConfig config,
-	    NativePixmapType native_pixmap, const EGLint *attrib_list);
+	    void *native_pixmap, const EGLint *attrib_list);
 EGLSurface (*peglCreatePlatformWindowSurfaceEXT)(EGLDisplay display, EGLConfig config,
-	    NativeWindowType native_window, const EGLint *attrib_list);
+	    void *native_window, const EGLint *attrib_list);
 
 static void
 init_egl_extension_funcs(void)
@@ -122,7 +122,7 @@ test_create_pixmap(void *test_data)
 	test_setup(&dpy);
 
 	surf = peglCreatePlatformPixmapSurfaceEXT(dpy, EGL_NO_CONFIG_KHR,
-					      /*native_window*/ NULL,
+					      /*native_pixmap*/ NULL,
 					      /*attrib_list*/ NULL);
 	if (surf) {
 		printf("eglCreatePlatformPixmapSurface incorrectly succeeded\n");
-- 
2.9.4



More information about the Piglit mailing list