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

Michael Niedermayer michaelni at gmx.at
Mon May 30 00:51:40 CEST 2011


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


> 
> 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


> 
> And for the matroskadec, it is indeed a false positive, but I wonder if
> it's worth commenting that change.

agree

[...]


-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110530/608778cb/attachment.asc>


More information about the ffmpeg-devel mailing list