summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2013-02-24 08:46:42 +0100
committerTomasz Stanislawski <t.stanislaws@samsung.com>2013-03-13 10:49:34 +0100
commit21765c66561d6670098a9bb3d70f05f221490714 (patch)
treeb4cf9089aeef9fb686a2f760341b2156a8ede1da
parentba2ab4d78e7ae87b323a918b129a1cd6b2722f2f (diff)
v4l2-drm-example: Fix compiler warnings
Mark unused function parameters as unused and fix signed vs. unsigned comparisons. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--v4l2-drm-example/dmabuf-sharing.c11
1 files changed, 7 insertions, 4 deletions
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);