[FFmpeg-devel] [PATCH] fix uninitialized variable warning in seek_test.c

Benoit Fouet benoit.fouet
Thu Mar 26 14:21:17 CET 2009


On 03/26/2009 02:02 PM, Diego Biurrun wrote:
> On Thu, Mar 26, 2009 at 01:56:22PM +0100, Benoit Fouet wrote:
>   
>> attached is a patch to $subj
>>
>> --- tests/seek_test.c	(revision 18194)
>> +++ tests/seek_test.c	(working copy)
>> @@ -70,7 +70,7 @@ int main(int argc, char **argv)
>>  
>>      for(i=0; ; i++){
>>          AVPacket pkt;
>> -        AVStream *st;
>> +        AVStream *av_uninit(st);
>>     
>
> The #include is missing I think.
>
>   

indeed, fixed

> Does performance matter in any way here?  Otherwise it might be simpler
> to initialize the variable.
>
>   

I don't care, I just wanted to fix the false warning :)

Ben


Index: tests/seek_test.c
===================================================================
--- tests/seek_test.c    (revision 18194)
+++ tests/seek_test.c    (working copy)
@@ -23,6 +23,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
+#include "libavutil/common.h"
 #include "libavformat/avformat.h"
 
 #undef exit
@@ -70,7 +71,7 @@ int main(int argc, char **argv)
 
     for(i=0; ; i++){
         AVPacket pkt;
-        AVStream *st;
+        AVStream *av_uninit(st);
 
         memset(&pkt, 0, sizeof(pkt));
         if(ret>=0){





More information about the ffmpeg-devel mailing list