From db905f467169f9f131c5ddc6038296f866d5daeb Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Fri, 26 Jul 2019 13:44:47 +0200 Subject: [PATCH] shared/platform: avoid build warning when building without gl-renderer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When building without GL renderer the compiler prints the following warning: ../clients/subsurfaces.c: In function ‘egl_state_create’: ../clients/subsurfaces.c:225:35: warning: passing argument 1 of ‘weston_platform_get_egl_display’ makes pointer from integer without a cast [-Wint-conversion] 225 | weston_platform_get_egl_display(EGL_PLATFORM_WAYLAND_KHR, | ^~~~~~~~~~~~~~~~~~~~~~~~ | | | int ... Define the fallback implementation of weston_platform_get_egl_display to take an integer which is the underlaying datatype of EGLenum. Signed-off-by: Stefan Agner --- shared/platform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/platform.h b/shared/platform.h index 40d9bf2a..9264bb43 100644 --- a/shared/platform.h +++ b/shared/platform.h @@ -138,7 +138,7 @@ weston_platform_destroy_egl_surface(EGLDisplay display, #else /* ENABLE_EGL */ static inline void * -weston_platform_get_egl_display(void *platform, void *native_display, +weston_platform_get_egl_display(int platform, void *native_display, const int *attrib_list) { return NULL;