Suppress spurious 'may be used uninitialized' gcc warnings in floor1.c
authorMonty <xiphmont@xiph.org>
Mon, 2 Mar 2015 23:03:34 +0000 (23:03 +0000)
committerMonty <xiphmont@xiph.org>
Mon, 2 Mar 2015 23:03:34 +0000 (23:03 +0000)
encode with static initializers.

git-svn-id: http://svn.xiph.org/trunk/vorbis@19455 0101bb08-14d6-0310-b084-bc0e0c8e3800

lib/floor1.c

index 49ef52d..da248f4 100644 (file)
@@ -855,7 +855,9 @@ int floor1_encode(oggpack_buffer *opb,vorbis_block *vb,
 
       /* generate the partition's first stage cascade value */
       if(csubbits){
-        int maxval[8];
+        int maxval[8]={0,0,0,0,0,0,0,0}; /* gcc's static analysis
+                                            issues a warning without
+                                            initialization */
         for(k=0;k<csub;k++){
           int booknum=info->class_subbook[class][k];
           if(booknum<0){