[FFmpeg-devel] [PATCH] remove __attribute__((unused))

Reimar Döffinger Reimar.Doeffinger
Mon May 14 16:31:42 CEST 2007


Hello,
On Mon, May 14, 2007 at 03:15:23PM +0100, M?ns Rullg?rd wrote:
> Reimar D?ffinger wrote:
> > On Sun, May 13, 2007 at 09:49:59PM +0200, Michael Niedermayer wrote:
> >> On Sun, May 13, 2007 at 06:51:01PM +0200, Reimar D?ffinger wrote:
> >> [...]
> >> > > > Index: libavcodec/h264.c
> >> > > > ===================================================================
> >> > > > --- libavcodec/h264.c	(revision 9014)
> >> > > > +++ libavcodec/h264.c	(working copy)
> >> > > > @@ -1800,7 +1800,7 @@
> >> > > >      const int lt= src[-1-1*stride];
> >> > > >      LOAD_TOP_EDGE
> >> > > >      LOAD_LEFT_EDGE
> >> > > > -    const __attribute__((unused)) int unu= l3;
> >> > > > +    const int unu= l3;
> >> > >
> >> > > This and similar cases is to kill a warning about l3 (or whatever)
> >> > > being unused.  The variable l3 is declared by the macro
> >> > > LOAD_LEFT_EDGE, but isn't used everywhere this macro is invoked.  I
> >> > > think the proper solution is to put attribute_unused on all the
> >> > > variables declared by those macros.
> >> >
> >> > I tend to agree but this is for the maintainers to decide.
> >>
> >> iam ok with it ...
> >
> > Like in attached patch?
> 
> That's how I meant, but please put the attribute_unused to the left of the
> variable name.  Either side works, but I think it looks strange having it
> on the right.

I don't mind, but I'd like to say that the two other macros that already
use it (PT and PL) and somewhere in cabac.h have it to the right of the
name as well. svq3.c has it even to the left of the type whereas
motion_est_template.c has it between type and name.
If there is a clear preference I can adjust the patch and after that all
other occurrences but I won't change things if then only the next one
will complain ;-)

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list