All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Erik Andrén" <erik.andren@gmail.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Linux and Kernel Video <video4linux-list@redhat.com>
Subject: Re: Warning on stv06xx
Date: Tue, 30 Dec 2008 08:58:36 +0100	[thread overview]
Message-ID: <4959D4AC.2010007@gmail.com> (raw)
In-Reply-To: <20081229203513.13b6b1ca@pedra.chehab.org>

[-- Attachment #1: Type: text/plain, Size: 749 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Mauro Carvalho Chehab wrote:
> Hi Erik,
> 
> Could you please take a look on this?
> 
> drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c: In function ‘hdcs_set_size’:
> drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c:301: warning: ‘y’ may be used uninitialized in this function
> 
> By looking on that function, it seems that this condition can happen.
> 
> Cheers,
> Mauro
> 

Thanks for the heads up.
The attached patch should fix it.

Signed-off-by: Erik Andrén <erik.andren@gmail.com>




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAklZ1KwACgkQN7qBt+4UG0HZGgCdE5xskMxhhD/l/a1oRQE+NwFk
3h0An38PySqZ17FkZKFCb8XbX05n/P93
=rNh+
-----END PGP SIGNATURE-----

[-- Attachment #2: fix_y_related_warn.diff --]
[-- Type: text/x-diff, Size: 598 bytes --]

diff -r 75aa52e36cc9 linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
--- a/linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c	Tue Dec 30 01:31:59 2008 -0200
+++ b/linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c	Tue Dec 30 08:54:10 2008 +0100
@@ -317,8 +317,10 @@
 
 		y = (hdcs->array.height - HDCS_1020_BOTTOM_Y_SKIP - height) / 2
 				+ hdcs->array.top;
-	} else if (height > hdcs->array.height) {
-		height = hdcs->array.height;
+	} else {
+		if (height > hdcs->array.height)
+			height = hdcs->array.height;
+
 		y = hdcs->array.top + (hdcs->array.height - height) / 2;
 	}
 

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

      reply	other threads:[~2008-12-30  7:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-29 22:35 Warning on stv06xx Mauro Carvalho Chehab
2008-12-30  7:58 ` Erik Andrén [this message]

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=4959D4AC.2010007@gmail.com \
    --to=erik.andren@gmail.com \
    --cc=mchehab@infradead.org \
    --cc=video4linux-list@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.