[FFmpeg-devel] [PATCH] Fix warnings in decode_dvd_subtitles (in libavcodec/dvdsubdec.c)
Michael Niedermayer
michaelni
Wed Jul 7 12:02:36 CEST 2010
On Tue, Jul 06, 2010 at 08:26:14PM -0700, Eli Friedman wrote:
> Attached. Fixes warnings of the form "'colormap[3]' may be used
> uninitialized in this function". In this particular case, gcc is
> correct: there will be uninitialized reads for any stream without a
> "set colormap" command. Therefore, this patch adds an initializer for
> it.
the good: you and the compiler found a bug if something uninitialized can be
used
the bad: you cover it up instead of fixing it. What makes you think simply
setting the array to 0 is reasonable in this case?
and before you ask, no i dont know what the correct fix is, but when in
doubt detection and error message is at least making recognizing a problem
and doing something about it in the future easier.
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100707/a772e673/attachment.pgp>
More information about the ffmpeg-devel
mailing list