[Commits] SDL: egl: Cast to size_t, in case platform's NativeDisplayType i...

libsdl.org revision control commits-owner at libsdl.org
Tue Aug 29 13:30:53 PDT 2017


details:   https://hg.libsdl.org/SDL/rev/7749a3b2b343
changeset: 11418:7749a3b2b343
user:      Ryan C. Gordon <icculus at icculus.org>
date:      Tue Aug 29 16:30:49 2017 -0400
description:
egl: Cast to size_t, in case platform's NativeDisplayType isn't a pointer.

(fixes compiler warnings on QNX.)

diffstat:

 src/video/SDL_egl.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 58a0bc85b216 -r 7749a3b2b343 src/video/SDL_egl.c
--- a/src/video/SDL_egl.c	Tue Aug 29 16:05:03 2017 -0400
+++ b/src/video/SDL_egl.c	Tue Aug 29 16:30:49 2017 -0400
@@ -380,12 +380,12 @@
 #if !defined(__WINRT__)
     if (platform) {
         if (egl_version_major == 1 && egl_version_minor == 5) {
-            _this->egl_data->egl_display = _this->egl_data->eglGetPlatformDisplay(platform, (void *)native_display, NULL);
+            _this->egl_data->egl_display = _this->egl_data->eglGetPlatformDisplay(platform, (void *)(size_t)native_display, NULL);
         } else {
             if (SDL_EGL_HasExtension(_this, SDL_EGL_CLIENT_EXTENSION, "EGL_EXT_platform_base")) {
                 _this->egl_data->eglGetPlatformDisplayEXT = SDL_EGL_GetProcAddress(_this, "eglGetPlatformDisplayEXT");
                 if (_this->egl_data->eglGetPlatformDisplayEXT) {
-                    _this->egl_data->egl_display = _this->egl_data->eglGetPlatformDisplayEXT(platform, (void *)native_display, NULL);
+                    _this->egl_data->egl_display = _this->egl_data->eglGetPlatformDisplayEXT(platform, (void *)(size_t)native_display, NULL);
                 }
             }
         }


More information about the commits mailing list