V4L/DVB (11225): v4lgrab: fix compilation warnings
authorMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 26 Mar 2009 15:07:36 +0000 (12:07 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Mar 2009 15:43:41 +0000 (12:43 -0300)
Documentation/video4linux/v4lgrab.c: In function ‘main’:
Documentation/video4linux/v4lgrab.c:193: warning: ‘src_depth’ is used uninitialized in this function
Documentation/video4linux/v4lgrab.c:108: warning: ‘b’ may be used uninitialized in this function
Documentation/video4linux/v4lgrab.c:108: warning: ‘g’ may be used uninitialized in this function
Documentation/video4linux/v4lgrab.c:108: warning: ‘r’ may be used uninitialized in this function

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Documentation/video4linux/v4lgrab.c

index d6e70bef8ad0a98d040b8dd5cb5a3272a233f7bb..05769cff100998a60ba991325f48f62fe80bc889 100644 (file)
@@ -105,8 +105,8 @@ int main(int argc, char ** argv)
   struct video_picture vpic;
 
   unsigned char *buffer, *src;
-  int bpp = 24, r, g, b;
-  unsigned int i, src_depth;
+  int bpp = 24, r = 0, g = 0, b = 0;
+  unsigned int i, src_depth = 16;
 
   if (fd < 0) {
     perror(VIDEO_DEV);