* Warning on stv06xx
@ 2008-12-29 22:35 Mauro Carvalho Chehab
2008-12-30 7:58 ` Erik Andrén
0 siblings, 1 reply; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2008-12-29 22:35 UTC (permalink / raw)
To: Erik Andrén, Jean-Francois Moine; +Cc: Linux and Kernel Video
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
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Warning on stv06xx
2008-12-29 22:35 Warning on stv06xx Mauro Carvalho Chehab
@ 2008-12-30 7:58 ` Erik Andrén
0 siblings, 0 replies; 2+ messages in thread
From: Erik Andrén @ 2008-12-30 7:58 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: Linux and Kernel Video
[-- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-30 7:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-29 22:35 Warning on stv06xx Mauro Carvalho Chehab
2008-12-30 7:58 ` Erik Andrén
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.