[FFmpeg-devel] [PATCH 2/4] cbs: Remove useless initializations

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Jun 3 09:17:45 EEST 2019

On 03.06.2019, at 00:37, Andreas Rheinhardt <andreas.rheinhardt at gmail.com> wrote:

> Up until now, a temporary variable was used and initialized every time a
> value was read in CBS; if reading turned out to be successfull, this
> value was overwritten (without having ever been looked at) with the
> value read if reading was successfull; on failure the variable wasn't
> touched either. Therefore these initializations can be and have been
> removed.
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
> And? What did the ancient compilers say?

Not sure how to read that, but some compilers probably produce "may be used uninitialized" warnings after this change.
IMHO it would be better to need evidence of an advantage to remove variable initialization for non-trivial code, even if they are unnecessary. Your commit message doesn't seem to mention one at least.
But I am happy to let some maintainer have the last word.

More information about the ffmpeg-devel mailing list