OSDN Git Service

[media] em28xx: fix uninitialized variable warning
authorHans Verkuil <hverkuil@xs4all.nl>
Mon, 29 Sep 2014 09:48:16 +0000 (06:48 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 21 Oct 2014 10:51:07 +0000 (08:51 -0200)
commit430e35724bf008742a211d4c18a9b2dff1f61a86
tree6810bb2de1f4360a11d32a81288ba1e5a25dc4fd
parent031d705c07bc7b911c49c49ae346e3223b6ced9b
[media] em28xx: fix uninitialized variable warning

Fix this daily build warning:

In file included from build/media_build/v4l/em28xx-core.c:35:0:
build/media_build/v4l/em28xx-core.c: In function 'em28xx_audio_setup':
build/media_build/v4l/em28xx.h:798:2: warning: 'vid' may be used uninitialized in this function [-Wmaybe-uninitialized]
  printk(KERN_INFO "%s: "fmt,\
  ^
build/media_build/v4l/em28xx-core.c:507:6: note: 'vid' was declared here
  u32 vid;
      ^

As far as I can tell 'vid' can not really be used uninitialized here, but the code
is sufficiently complex that apparently gcc can't figure that out.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/usb/em28xx/em28xx-core.c