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

Janne Grunau janne-ffmpeg
Thu Apr 29 01:08:30 CEST 2010

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

|if enabled small || disabled optimizations; then
|    echo "#undef  av_always_inline"  >> $TMPH
|    echo "#define av_always_inline"  >> $TMPH

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


More information about the ffmpeg-devel mailing list