Warning on stv06xx
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:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 4 lines · Mauro Carvalho Chehab
Hi Erik,
Could you please take a look on this?
Quoted 8 lines
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 functionBy looking on that function, it seems that this condition can happen.
Cheers,
Mauro
Thanks for the heads up.
The attached patch should fix it.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAklZ1KwACgkQN7qBt+4UG0HZGgCdE5xskMxhhD/l/a1oRQE+NwFk 3h0An38PySqZ17FkZKFCb8XbX05n/P93
=rNh+
-----END PGP SIGNATURE-----
linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c +4 -2
@@ -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 ; }
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list