[FFmpeg-devel] [PATCH 3/3] Fix various uninitialized variable warnings

Clément Bœsch ubitux at gmail.com
Tue May 31 22:55:22 CEST 2011


On Tue, May 31, 2011 at 10:37:47PM +0200, Michael Niedermayer wrote:
> On Tue, May 31, 2011 at 09:48:59PM +0200, Clément Bœsch wrote:
> > On Mon, May 30, 2011 at 12:51:40AM +0200, Michael Niedermayer wrote:
> > > On Mon, May 30, 2011 at 12:33:54AM +0200, Clément Bœsch wrote:
> > > > On Mon, May 30, 2011 at 12:20:19AM +0200, Michael Niedermayer wrote:
> > > > > On Sun, May 29, 2011 at 09:07:36PM +0200, Clément Bœsch wrote:
> > > > > > ---
> > > > > >  ffplay.c                  |    2 +-
> > > > > >  libavformat/iff.c         |    2 +-
> > > > > >  libavformat/matroskadec.c |    3 ++-
> > > > > >  3 files changed, 4 insertions(+), 3 deletions(-)
> > > > > 
> > > > > are all these warnings false positives?
> > > > > if so there should be comments explaining that the =0 is just to
> > > > > silence a warning and not strictly needed.
> > > > > This makes code easier to understand.
> > > > 
> > > > For the ffplay.c it's hard to say, I'm not familiar with the code enough.
> > > 
> > > i think the cmp code shouldnt be run if there is no output
> > > also -1 and AV_NOPTS_VALUE are better defaults than 0
> > > 
> > 
> > OK, changed.
> > 
> > > 
> > > > 
> > > > In iff, I'd say no if the codec_type is not audio or video (I guess it can
> > > > happen).
> > > 
> > > i dont think it can be anything else, the header reading should fail
> > > maybe an assert() could be added to check this
> > > 
> > 
> > What about av_abort()? It doesn't seem to be used much but av_assert*
> > would be overkill for such a thing IMO. Also, av_assert0 must be used (or
> > else it would warn in some cases) and so add a pointless check. What do
> > you prefer? (av_abort version attached).
> 
> iam fine with whatever you prefer, do you want me to commit/push or
> do you want to send me your ssh key, i think you didnt yet ?
> 

I won't be lazy for once and will gladly accept your offer :)

Public key attached, thank you very much.

-- 
Clément B.
-------------- next part --------------
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEArrFDCVFyOxlaON/ihF5BWjish7UmOk44xJLLutdFmIwvJ7f9kk0OHexRPnEdBigv6Y8/o1lNWnt+hT3j7oG0mKZR5ULk2jFPArVnPKqlBYNxNUdwnyk/3BfaWaGehfTrFfederRK7cGnmH3Z3tEsWg5MfEC820p4lkdHzhbdgSrQg1sG6PD5wm1cZDL5frLq7Pe7UqxTZHIRXZUxqg1kiu8wXL3ShMIKrLXVYXaFY6zo/MAf2bN4Ctmk/IqG0LmdwxTEBQuueTqTi3tFMml6ROMlgU5LQOpqxZ/eNH+6EJ1MQYhYoGDcr7pWFSFPtPaDFHMhme1z5lMNjeemOkX62w== ubitux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110531/ec4163d3/attachment.asc>


More information about the ffmpeg-devel mailing list