[FFmpeg-devel] [PATCH] ffmpeg: add av_unused to sws_flags variable

Michael Niedermayer michaelni
Sat Mar 12 13:16:20 CET 2011


On Sat, Mar 12, 2011 at 12:07:17PM +0000, M?ns Rullg?rd wrote:
> Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> 
> > On date Saturday 2011-03-12 11:43:03 +0000, M?ns Rullg?rd encoded:
> >> Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> >> 
> >> > The variable is not used when libavfilter is enabled.
> >> > Fix the warning:
> >> > ffmpeg.c: At top level:
> >> > ffmpeg.c:248: warning: ?sws_flags? defined but not used
> >> > ---
> >> >  ffmpeg.c |    2 +-
> >> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >> >
> >> > diff --git a/ffmpeg.c b/ffmpeg.c
> >> > index 7f90956..875d594 100644
> >> > --- a/ffmpeg.c
> >> > +++ b/ffmpeg.c
> >> > @@ -245,7 +245,7 @@ static char *forced_key_frames = NULL;
> >> >
> >> >  static float dts_delta_threshold = 10;
> >> >
> >> > -static unsigned int sws_flags = SWS_BICUBIC;
> >> > +static av_unused unsigned int sws_flags = SWS_BICUBIC;
> >> >
> >> >  static int64_t timer_start;
> >> 
> >> Shouldn't it be moved under some appropriate ifdef then?
> >
> > That's another option, updated.
> > -- 
> > FFmpeg = Fundamentalist & Faithless Mystic Peaceless Evangelical Guide
> >
> > From 03ebba4cc7f99ce55684b20ea698b3e6aad23d0e Mon Sep 17 00:00:00 2001
> > From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> > Date: Sat, 12 Mar 2011 12:12:38 +0100
> > Subject: [PATCH] ffmpeg: include conditionally the sws_flags variable
> > MIME-Version: 1.0
> > Content-Type: text/plain; charset=UTF-8
> > Content-Transfer-Encoding: 8bit
> >
> > The variable is not used when libavfilter is enabled.
> > Fix the warning:
> > ffmpeg.c: At top level:
> > ffmpeg.c:248: warning: ?sws_flags? defined but not used
> > ---
> >  ffmpeg.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/ffmpeg.c b/ffmpeg.c
> > index 7f90956..60a65a4 100644
> > --- a/ffmpeg.c
> > +++ b/ffmpeg.c
> > @@ -245,7 +245,9 @@ static char *forced_key_frames = NULL;
> >  
> >  static float dts_delta_threshold = 10;
> >  
> > +#if !CONFIG_AVFILTER
> >  static unsigned int sws_flags = SWS_BICUBIC;
> > +#endif
> >  
> >  static int64_t timer_start;
> >  
> 
> I'd rather use the existing ifdef a page up from there.

ok

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

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110312/13142db5/attachment.pgp>



More information about the ffmpeg-devel mailing list