Skip to content

Commit

Permalink
V4L/DVB (4510): Fix signedness error in drivers/media/video/vivi.c
Browse files Browse the repository at this point in the history
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 <snakebyte@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Eric Sesterhenn authored and Mauro Carvalho Chehab committed Sep 26, 2006
1 parent 3153d0d commit d084aa7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/video/vivi.c
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,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;
Expand Down

0 comments on commit d084aa7

Please sign in to comment.