summaryrefslogtreecommitdiff
path: root/v4l2-drm-example
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-02-24 08:46:43 +0100
committerTomasz Stanislawski <t.stanislaws@samsung.com>2013-03-13 10:49:34 +0100
commit0cf71b73850f9625b2c9cbe798c002d03a7e6287 (patch)
tree1a7bcc004b84d5e5684ef15d54c559210d58bbe8 /v4l2-drm-example
parent21765c66561d6670098a9bb3d70f05f221490714 (diff)
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 <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'v4l2-drm-example')
-rw-r--r--v4l2-drm-example/dmabuf-sharing.c4
1 files changed, 2 insertions, 2 deletions
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);
}