[FFmpeg-devel] [PATCHv2] avcodec/videotoolbox: fix -Wunused-but-set-variable

Michael Niedermayer michaelni at gmx.at
Tue Sep 29 05:01:42 CEST 2015


On Mon, Sep 28, 2015 at 10:15:01AM -0400, Ganesh Ajjanagadde wrote:
> On Sat, Sep 26, 2015 at 12:09 PM, wm4 <nfxjfg at googlemail.com> wrote:
> > On Sat, 26 Sep 2015 10:55:29 -0400
> > Ganesh Ajjanagadde <gajjanagadde at gmail.com> wrote:
> >
> >> On Sat, Sep 19, 2015 at 5:41 PM, Ganesh Ajjanagadde
> >> <gajjanagadde at gmail.com> wrote:
> >> > pix_fmt was declared presumably to shorten the argument passed to the function.
> >> > However, it is currently not being used for such a purpose.
> >> > This patch simply removes it instead.
> >> > This fixes -Wunused-but-set-variable reported at e.g:
> >> > http://fate.ffmpeg.org/log.cgi?time=20150919194249&log=compile&slot=x86_64-darwin-gcc-4.9.
> >> >
> >> > Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> >> > ---
> >> >  libavcodec/videotoolbox.c | 3 ---
> >> >  1 file changed, 3 deletions(-)
> >> >
> >> > diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
> >> > index b78238a..ca44491 100644
> >> > --- a/libavcodec/videotoolbox.c
> >> > +++ b/libavcodec/videotoolbox.c
> >> > @@ -501,7 +501,6 @@ static int videotoolbox_default_init(AVCodecContext *avctx)
> >> >      VTDecompressionOutputCallbackRecord decoder_cb;
> >> >      CFDictionaryRef decoder_spec;
> >> >      CFDictionaryRef buf_attr;
> >> > -    int32_t pix_fmt;
> >> >
> >> >      if (!videotoolbox) {
> >> >          av_log(avctx, AV_LOG_ERROR, "hwaccel context is not set\n");
> >> > @@ -528,8 +527,6 @@ static int videotoolbox_default_init(AVCodecContext *avctx)
> >> >          break;
> >> >      }
> >> >
> >> > -    pix_fmt = videotoolbox->cv_pix_fmt_type;
> >> > -
> >> >      decoder_spec = videotoolbox_decoder_config_create(videotoolbox->cm_codec_type, avctx);
> >> >
> >> >      videotoolbox->cm_fmt_desc = videotoolbox_format_desc_create(videotoolbox->cm_codec_type,
> >> > --
> >> > 2.5.2
> >> >
> >>
> >> ping
> >
> > LGTM
> 
> patch has been reviewed, anyone willing to push?

applied

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

You can kill me, but you cannot change the truth.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150929/92cd0766/attachment.sig>


More information about the ffmpeg-devel mailing list