From 0cf71b73850f9625b2c9cbe798c002d03a7e6287 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 24 Feb 2013 08:46:43 +0100 Subject: v4l2-drm-example: Fix compiler warnings on 64-bit machines Casting a 32-bit integer to a void * generates a warning. Fix it by casting the integer to an unsigned long first. This has no effect on 32-bit machines as unsigned long are 32-bit integers there. Signed-off-by: Laurent Pinchart --- v4l2-drm-example/dmabuf-sharing.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'v4l2-drm-example/dmabuf-sharing.c') diff --git a/v4l2-drm-example/dmabuf-sharing.c b/v4l2-drm-example/dmabuf-sharing.c index 2cc9ca3..7d09e92 100644 --- a/v4l2-drm-example/dmabuf-sharing.c +++ b/v4l2-drm-example/dmabuf-sharing.c @@ -303,7 +303,7 @@ static void page_flip_handler(int fd __attribute__((__unused__)), struct v4l2_buffer buf; int ret; - stream.current_buffer = (int)data; + stream.current_buffer = (unsigned long)data; if (index < 0) return; @@ -447,7 +447,7 @@ int main(int argc, char *argv[]) BYE_ON(ret, "VIDIOC_DQBUF failed: %s\n", ERRSTR); ret = drmModePageFlip(drmfd, s.crtId, buffer[buf.index].fb_handle, - DRM_MODE_PAGE_FLIP_EVENT, (void*)buf.index); + DRM_MODE_PAGE_FLIP_EVENT, (void*)(unsigned long)buf.index); BYE_ON(ret, "drmModePageFlip failed: %s\n", ERRSTR); } -- cgit v1.2.3