[FFmpeg-devel] [PATCHv2] avutil/attributes: extend av_uninit to clang

Ganesh Ajjanagadde gajjanag at mit.edu
Thu Oct 8 00:22:21 CEST 2015


On Wed, Oct 7, 2015 at 3:34 PM, Michael Niedermayer
<michael at niedermayer.cc> wrote:
> On Wed, Oct 07, 2015 at 12:29:35PM -0400, Ganesh Ajjanagadde wrote:
>> Commit 6dac8c8327 disabled av_uninit for clang, due to some useless warnings.
>> The concept of av_uninit is inherently useful though. This patch silences a
>> bunch of warnings on clang e.g
>> http://fate.ffmpeg.org/log.cgi?time=20150918181527&log=compile&slot=x86_64-darwin-clang-polly-vectorize-stripmine-3.7.
>> Furthermore, it should be useful for general usage of av_uninit in future.
>>
>> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>> ---
>>  libavutil/attributes.h | 6 ++++++
>>  1 file changed, 6 insertions(+)
>
> breaks gcc
> ./configure
> make
> CC      libavdevice/alldevices.o
> In file included from ./libavutil/common.h:42:0,
>                  from ./libavutil/avutil.h:288,
>                  from ./libavutil/log.h:25,
>                  from libavdevice/avdevice.h:46,
>                  from libavdevice/alldevices.c:22:
> ./libavutil/attributes.h:150:42: error: missing binary operator before token "("
> make: *** [libavdevice/alldevices.o] Error 1

Wow, this works with GCC 5.2 (tested on Arch) but not on your gcc, and
(just checked) does not work either on Debian GCC 4.9.
Anyway, it seems to me that for whatever reason short circuit
evaluation is not respected by the GCC preprocessor (I lack the energy
or interest to investigate why, it seems ridiculous to me):
https://bugs.webkit.org/show_bug.cgi?id=133785

Apologies for the repeated failed attempts, but I have taken a new
stab at it (tested on debian clang 3.0, arch clang 3.7, debian gcc
4.9, arch gcc 5.2).

>
> [...]
>
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Many that live deserve death. And some that die deserve life. Can you give
> it to them? Then do not be too eager to deal out death in judgement. For
> even the very wise cannot see all ends. -- Gandalf
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list