Skip to content

Commit

Permalink
V4L/DVB (10127): stv06xx: Avoid having y unitialized
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Erik Andrén authored and Mauro Carvalho Chehab committed Dec 30, 2008
1 parent de84830 commit 1970f14
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 1970f14

Please sign in to comment.