[FFmpeg-devel] [PATCH] The definition of av_always_inline with --enable-small or --disable-optimizations

Michael Niedermayer michaelni
Tue Dec 14 16:37:07 CET 2010

On Tue, Dec 14, 2010 at 11:28:36AM +0200, Martin Storsj? wrote:
> Hi,
> At the end of the configure script, we currently do this:
> if enabled small || disabled optimizations; then
>     echo "#undef  av_always_inline"  >> $TMPH
>     echo "#define av_always_inline"  >> $TMPH
> fi
> This causes a lot of warnings when building with either of these 
> configurations, warnings like this one:
> ./libavutil/x86/bswap.h:32: warning: ?av_bswap16? defined but not used
> These warnings can be silenced either by adding -Wno-unused-function to 
> the cflags, or by changing the definition of av_always_inline for this 
> case. Possible options are:
> - empty, as currently, spewing lots of warnings
> - inline (as opposed to the __attribute__((always_inline) used otherwise), 
>   but that won't avoid all inlineing even if the user requested 
>   --disable-optimizations

> - __attribute__((unused)), which seems to be supported since gcc 2.95

This would suppress unused warnings incorrectly

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/20101214/5675d21b/attachment.pgp>

More information about the ffmpeg-devel mailing list