On 02/13/2012 04:15 AM, Diego Biurrun wrote:

> ---
>  libavcodec/ac3enc.c          |    6 ++----
>  libavcodec/ac3enc_template.c |    2 +-
>  libavcodec/eatgv.c           |    2 +-
>  libavcodec/flacdec.c         |    2 +-
>  libavcodec/msrledec.c        |    4 ++--
>  libavcodec/qtrleenc.c        |    2 +-
>  6 files changed, 8 insertions(+), 10 deletions(-)
> 
> diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
> index b8e23e4..3bf5f94 100644
> --- a/libavcodec/ac3enc.c
> +++ b/libavcodec/ac3enc.c
> @@ -1386,8 +1386,7 @@ static void ac3_output_frame_header(AC3EncodeContext *s)
>   */
>  static void output_audio_block(AC3EncodeContext *s, int blk)
>  {
> -    int ch, i, baie, bnd, got_cpl;
> -    int av_uninit(ch0);
> +    int ch, i, baie, bnd, got_cpl, ch0;
>      AC3Block *block = &s->blocks[blk];
>  
>      /* block switching */
> @@ -2236,8 +2235,7 @@ static av_cold int validate_options(AC3EncodeContext *s)
>   */
>  static av_cold void set_bandwidth(AC3EncodeContext *s)
>  {
> -    int blk, ch;
> -    int av_uninit(cpl_start);
> +    int blk, ch, cpl_start;
>  
>      if (s->cutoff) {
>          /* calculate bandwidth based on user-specified cutoff frequency */
> diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c
> index 3396ed1..bc06c2f 100644
> --- a/libavcodec/ac3enc_template.c
> +++ b/libavcodec/ac3enc_template.c
> @@ -335,7 +335,7 @@ static void compute_rematrixing_strategy(AC3EncodeContext 
> *s)
>  {
>      int nb_coefs;
>      int blk, bnd, i;
> -    AC3Block *block, *av_uninit(block0);
> +    AC3Block *block, *block0;
>  
>      if (s->channel_mode != AC3_CHMODE_STEREO)
>          return;


I'm not against removing these, but I want to point out that removing
them causes (invalid) gcc warnings when making seemingly unrelated
changes to the code. I did this in the first place to cut out the
unnecessary noise, but if people really want these removed, that's fine.
I've been told clang gives warnings when we use av_uninit() when it
otherwise would not.

-Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to