[FFmpeg-devel] [PATCH 07/11] cbs: Remove useless initializations

Mark Thompson sw at jkqxz.net
Wed May 29 02:12:35 EEST 2019


On 22/05/2019 02:04, Andreas Rheinhardt 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>
> ---
>  libavcodec/cbs_av1.c   | 14 +++++++-------
>  libavcodec/cbs_h2645.c |  8 ++++----
>  libavcodec/cbs_jpeg.c  |  2 +-
>  libavcodec/cbs_mpeg2.c |  2 +-
>  libavcodec/cbs_vp9.c   |  8 ++++----
>  5 files changed, 17 insertions(+), 17 deletions(-)

IIRC this was from a broken warning in an older compiler (when you get a separate warning for every syntax element it's not particularly helpful to argue that the compiler is wrong).  I'll see if I can dig up the case this happened in, it probably doesn't apply everywhere and might be worth dropping anyway.

- Mark


More information about the ffmpeg-devel mailing list