Skip to contentSkip to conversation

Warning in omap_vout.c

DISCUSSION Hans Verkuil 2 participants 2 messages May 22, 2012 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

(Repost, this time without using HTML. My mailer switches to HTML once in a while for no reason. Very annoying.)

The daily build has this warning:

v4l-dvb-git/drivers/media/video/omap/omap_vout.c: In function ‘omapvid_init’:
v4l-dvb-git/drivers/media/video/omap/omap_vout.c:381:17: warning: ‘mode’ may be used uninitialized in this function [-Wuninitialized] v4l-dvb-git/drivers/media/video/omap/omap_vout.c:331:23: note: ‘mode’ was declared here

Can someone check this?

The problem is that video_mode_to_dss_mode() has a 'case 0:' that never sets the mode. I suspect that the case 0 can be removed so that it goes to the default case.

Can someone verify this?

Regards,

Hans

#1 lore raw
Quoted 9 lines · Hans Verkuil

(Repost, this time without using HTML. My mailer switches to HTML once in a while for no reason. Very annoying.)

The daily build has this warning:

v4l-dvb-git/drivers/media/video/omap/omap_vout.c: In function 'omapvid_init':
v4l-dvb-git/drivers/media/video/omap/omap_vout.c:381:17: warning: 'mode' may be used uninitialized in this function [-Wuninitialized] v4l-dvb-git/drivers/media/video/omap/omap_vout.c:331:23: note: 'mode' was declared here

Quoted 8 lines

Can someone check this?

The problem is that video_mode_to_dss_mode() has a 'case 0:' that never sets the mode. I suspect that the case 0 can be removed so that it goes to the default case.

Can someone verify this?

Thanks Hans for bringing my attention to this. I had submitted patch sometime back, then after couldn't able to follow up on it.

http://markmail.org/thread/uuv4szdy47bjgzvh

I will check on this.

Thanks,
Vaibhav