From: Eric Sesterhenn <snakebyte@gmx.de>
To: linux-kernel@vger.kernel.org
Cc: mchehab@infradead.org
Subject: [Patch] Fix signedness error in drivers/media/video/vivi.c
Date: Sat, 19 Aug 2006 18:19:27 +0200 [thread overview]
Message-ID: <1156004367.17863.2.camel@alice> (raw)
hi,
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>
--- linux-2.6.18-rc4/drivers/media/video/vivi.c.orig 2006-08-19 18:13:45.000000000 +0200
+++ linux-2.6.18-rc4/drivers/media/video/vivi.c 2006-08-19 18:14:16.000000000 +0200
@@ -992,7 +992,8 @@ static int vidiocgmbuf (struct file *fil
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;
next reply other threads:[~2006-08-19 16:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-19 16:19 Eric Sesterhenn [this message]
2006-08-20 18:25 ` [Patch] Fix signedness error in drivers/media/video/vivi.c Alan Cox
2006-08-21 15:10 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1156004367.17863.2.camel@alice \
--to=snakebyte@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox