OSDN Git Service

avformat/wavdec: Eliminate goto for clang -O0 DCE
authorMark Harris <mark.hsj@gmail.com>
Fri, 16 Dec 2016 00:44:57 +0000 (16:44 -0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 16 Dec 2016 02:00:03 +0000 (03:00 +0100)
commita5cf600ccb7f20b65d552fef5c5d010513fcf74c
tree5adb2376f08c91087b7da031d9787a05914ce746
parentd4c1cc2b876af1e8f1a8ca258bf092b3baa31245
avformat/wavdec: Eliminate goto for clang -O0 DCE

Clang is not able to eliminate the reference to ff_spdif_probe() when
there is a goto target in the same block and optimization is disabled.

This fixes the following build failure on OS X:
  ./configure --disable-everything --disable-doc \
    --enable-decoder=pcm_s16le --enable-demuxer=wav \
    --enable-protocol=file --disable-optimizations --cc=clang
  make
  ...
  Undefined symbols for architecture x86_64:
    "_ff_spdif_probe", referenced from:
        _set_spdif in libavformat.a(wavdec.o)
  ld: symbol(s) not found for architecture x86_64

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/wavdec.c