[FFmpeg-devel] [PATCH] add some av_unused attributes

Måns Rullgård mans
Thu Apr 29 02:00:20 CEST 2010

Janne Grunau <janne-ffmpeg at jannau.net> writes:

> On Wed, Apr 28, 2010 at 10:44:18PM +0100, M?ns Rullg?rd wrote:
>> Daniel Kristjansson <danielk at cuymedia.net> writes:
>> > This happens when compiling MythTV's version of ffmpeg, we compile with
>> > "-Wall -Wdisabled-optimization -Wredunant-decls -Wundef". I've been
>> > trying to clean up the MythTV version and submit our patches upstream
>> > so we can hopefully avoid using a patched version downstream at some
>> > point. I didn't realize this didn't affect upstream compiles (which do
>> > have many warnings, at least when I compile them.)
>> We use those warning flags and more, so it must be something else
>> you're doing that causes them.  Is av_always_inline perhaps not being
>> defined properly?
> yes, since it's a debug build with optimizations disabled it has

That's generally a bad idea which doesn't actually aid debugging much
at all.  At least that's my experience.

> |if enabled small || disabled optimizations; then
> |    echo "#undef  av_always_inline"  >> $TMPH
> |    echo "#define av_always_inline"  >> $TMPH
> |fi
> in config.h
> but only g++ seems to warn about it. gcc seems to ignore it. The
> warnings go away with -Wno-unused-function. gcc doesn't even warn with
> -Wall -Wunused-function.
> Defining av_always_inline as av_unused might be the least contorversial
> solution.

That would certainly be better.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list