From 21765c66561d6670098a9bb3d70f05f221490714 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 24 Feb 2013 08:46:42 +0100 Subject: v4l2-drm-example: Fix compiler warnings Mark unused function parameters as unused and fix signed vs. unsigned comparisons. Signed-off-by: Laurent Pinchart --- v4l2-drm-example/dmabuf-sharing.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'v4l2-drm-example') diff --git a/v4l2-drm-example/dmabuf-sharing.c b/v4l2-drm-example/dmabuf-sharing.c index 3fe8f9c..2cc9ca3 100644 --- a/v4l2-drm-example/dmabuf-sharing.c +++ b/v4l2-drm-example/dmabuf-sharing.c @@ -293,8 +293,11 @@ fail_res: return ret; } -static void page_flip_handler(int fd, unsigned int frame, - unsigned int sec, unsigned int usec, void *data) +static void page_flip_handler(int fd __attribute__((__unused__)), + unsigned int frame __attribute__((__unused__)), + unsigned int sec __attribute__((__unused__)), + unsigned int usec __attribute__((__unused__)), + void *data) { int index = stream.current_buffer; struct v4l2_buffer buf; @@ -386,7 +389,7 @@ int main(int argc, char *argv[]) uint64_t size = fmt.fmt.pix.sizeimage; uint32_t pitch = fmt.fmt.pix.bytesperline; printf("size = %llu pitch = %u\n", size, pitch); - for (int i = 0; i < s.buffer_count; ++i) { + for (unsigned int i = 0; i < s.buffer_count; ++i) { ret = buffer_create(&buffer[i], drmfd, &s, size, pitch); BYE_ON(ret, "failed to create buffer%d\n", i); } @@ -406,7 +409,7 @@ int main(int argc, char *argv[]) DRM_MODE_PAGE_FLIP_EVENT, 0); BYE_ON(ret, "drmModePageFlip failed: %s\n", ERRSTR); - for (int i = 1; i < s.buffer_count; ++i) { + for (unsigned int i = 1; i < s.buffer_count; ++i) { struct v4l2_buffer buf; memset(&buf, 0, sizeof buf); -- cgit v1.2.3