diff options
author | Jeremy Huddleston <jeremyhu@apple.com> | 2011-11-01 14:42:13 -0700 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-11-01 14:42:13 -0700 |
commit | 961bf9b5c2866ccb4fedf2b45b29fb688519d0db (patch) | |
tree | adf3cb063e7e4e09188dba1e68260f789fecbb50 | |
parent | cc9b751e82c5a3525907bba30ba3c95246751824 (diff) |
Fix compilation with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | xf86drm.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -976,7 +976,7 @@ int drmAddMap(int fd, drm_handle_t offset, drmSize size, drmMapType type, if (drmIoctl(fd, DRM_IOCTL_ADD_MAP, &map)) return -errno; if (handle) - *handle = (drm_handle_t)map.handle; + *handle = (drm_handle_t)(uintptr_t)map.handle; return 0; } @@ -984,7 +984,7 @@ int drmRmMap(int fd, drm_handle_t handle) { drm_map_t map; - map.handle = (void *)handle; + map.handle = (void *)(uintptr_t)handle; if(drmIoctl(fd, DRM_IOCTL_RM_MAP, &map)) return -errno; @@ -2120,7 +2120,7 @@ int drmAddContextPrivateMapping(int fd, drm_context_t ctx_id, drm_ctx_priv_map_t map; map.ctx_id = ctx_id; - map.handle = (void *)handle; + map.handle = (void *)(uintptr_t)handle; if (drmIoctl(fd, DRM_IOCTL_SET_SAREA_CTX, &map)) return -errno; @@ -2137,7 +2137,7 @@ int drmGetContextPrivateMapping(int fd, drm_context_t ctx_id, if (drmIoctl(fd, DRM_IOCTL_GET_SAREA_CTX, &map)) return -errno; if (handle) - *handle = (drm_handle_t)map.handle; + *handle = (drm_handle_t)(uintptr_t)map.handle; return 0; } |