diff options
author | José Fonseca <[email protected]> | 2011-05-12 15:12:16 +0100 |
---|---|---|
committer | José Fonseca <[email protected]> | 2011-05-12 15:12:16 +0100 |
commit | 6a661895e946f38b21775bf9cb45ef6b22fab85a (patch) | |
tree | 434d628bb6fb99cc3352fef3905dc2cc4ddfdab4 /src/egl | |
parent | 6699cd4e8d88a8fd58a885bfac7e379313334283 (diff) |
egl: Fix int <-> ptr casts.
Based on zhigang gong <[email protected]>'s patch.
Diffstat (limited to 'src/egl')
-rw-r--r-- | src/egl/drivers/dri2/egl_dri2.c | 4 | ||||
-rw-r--r-- | src/egl/drivers/dri2/platform_drm.c | 2 | ||||
-rw-r--r-- | src/egl/drivers/dri2/platform_x11.c | 2 | ||||
-rw-r--r-- | src/egl/main/eglapi.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index afab679bff6..1acec51a433 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -835,7 +835,7 @@ dri2_create_image_khr_renderbuffer(_EGLDisplay *disp, _EGLContext *ctx, struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp); struct dri2_egl_context *dri2_ctx = dri2_egl_context(ctx); struct dri2_egl_image *dri2_img; - GLuint renderbuffer = (GLuint) buffer; + GLuint renderbuffer = (GLuint) (uintptr_t) buffer; if (renderbuffer == 0) { _eglError(EGL_BAD_PARAMETER, "dri2_create_image_khr"); @@ -870,7 +870,7 @@ dri2_create_image_mesa_drm_buffer(_EGLDisplay *disp, _EGLContext *ctx, (void) ctx; - name = (EGLint) buffer; + name = (EGLint) (uintptr_t) buffer; err = _eglParseImageAttribList(&attrs, disp, attr_list); if (err != EGL_SUCCESS) diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index 68912e36732..261cbfed675 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -690,7 +690,7 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp) memset(dri2_dpy, 0, sizeof *dri2_dpy); disp->DriverData = (void *) dri2_dpy; - dri2_dpy->fd = (int) disp->PlatformDisplay; + dri2_dpy->fd = (int) (intptr_t) disp->PlatformDisplay; dri2_dpy->driver_name = dri2_get_driver_for_fd(dri2_dpy->fd); if (dri2_dpy->driver_name == NULL) diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c index 5d4ac6ae948..2e26ff00b67 100644 --- a/src/egl/drivers/dri2/platform_x11.c +++ b/src/egl/drivers/dri2/platform_x11.c @@ -784,7 +784,7 @@ dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx, (void) ctx; - drawable = (xcb_drawable_t) buffer; + drawable = (xcb_drawable_t) (uintptr_t) buffer; xcb_dri2_create_drawable (dri2_dpy->conn, drawable); attachments[0] = XCB_DRI2_ATTACHMENT_BUFFER_FRONT_LEFT; buffers_cookie = diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 336ec23da5a..bdfdcb3817d 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -1168,7 +1168,7 @@ eglQueryModeStringMESA(EGLDisplay dpy, EGLModeMESA mode) EGLDisplay EGLAPIENTRY eglGetDRMDisplayMESA(int fd) { - _EGLDisplay *dpy = _eglFindDisplay(_EGL_PLATFORM_DRM, (void *) fd); + _EGLDisplay *dpy = _eglFindDisplay(_EGL_PLATFORM_DRM, (void *) (intptr_t) fd); return _eglGetDisplayHandle(dpy); } |