From ab3d72f8f8af39a05199d1eb2f196ebf1004de46 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 21 Aug 2006 10:36:36 -0300 Subject: Fix signedness error in drivers/media/video/vivi.c From: Eric Sesterhenn when checking the -Wextra signedness warnings issued by gcc 4.1 I came across this one: drivers/media/video/vivi.c:1001: warning: comparison of unsigned expression < 0 is always false Since videobuf_reqbufs() returns negative values on errors the current code does no real error checking since gcc removes the comparison. This patch fixes this issue by making ret a normal, signed integer. Signed-off-by: Eric Sesterhenn Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/vivi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux/drivers/media/video/vivi.c b/linux/drivers/media/video/vivi.c index de72ebf74..14af7b90f 100644 --- a/linux/drivers/media/video/vivi.c +++ b/linux/drivers/media/video/vivi.c @@ -1068,7 +1068,8 @@ static int vidiocgmbuf (struct file *file, void *priv, struct video_mbuf *mbuf) struct vivi_fh *fh=priv; struct videobuf_queue *q=&fh->vb_vidq; struct v4l2_requestbuffers req; - unsigned int i, ret; + unsigned int i; + int ret; req.type = q->type; req.count = 8; -- cgit v1.2.3