diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 08:58:36 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 08:58:36 +0100 |
commit | 8f753ccc1d4da5939f7a6b792ca9d47e16024a01 (patch) | |
tree | 9b05f7ca069680df08157d7ae22d054d27dc0a13 /linux/drivers/media/video/gspca/stv06xx | |
parent | 85ae2dbc568eeaf40b2c1d8426db2d19bb6dfc1b (diff) | |
download | mediapointer-dvb-s2-8f753ccc1d4da5939f7a6b792ca9d47e16024a01.tar.gz mediapointer-dvb-s2-8f753ccc1d4da5939f7a6b792ca9d47e16024a01.tar.bz2 |
stv06xx: Avoid having y unitialized
From: Erik Andrén <erik.andren@gmail.com>
As pointed by gcc:
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
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/gspca/stv06xx')
-rw-r--r-- | linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c b/linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c index 1cfe58504..14335a9e4 100644 --- a/linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c +++ b/linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c @@ -317,8 +317,10 @@ static int hdcs_set_size(struct sd *sd, 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; } |