[FFmpeg-devel] [PATCHv2] avcodec: use HAVE_THREADS header guards to silence -Wunused-function
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Thu Sep 17 15:23:53 CEST 2015
On Thu, Sep 17, 2015 at 9:15 AM, Paul B Mahol <onemda at gmail.com> wrote:
> On 9/17/15, Ganesh Ajjanagadde <gajjanagadde at gmail.com> wrote:
>> When compiled with --disable-pthreads, e.g
>> http://fate.ffmpeg.org/report.cgi?time=20150917015044&slot=alpha-debian-qemu-gcc-4.7,
>> a bunch of -Wunused-functions are reported.
>> This patch should silence such warnings.
>>
>> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>> ---
>> libavcodec/alac.c | 2 +-
>> libavcodec/exr.c | 2 +-
>> libavcodec/ffv1dec.c | 4 ++--
>> libavcodec/flacdec.c | 2 +-
>> libavcodec/h264.c | 2 +-
>> libavcodec/huffyuvdec.c | 2 +-
>> libavcodec/mdec.c | 2 +-
>> libavcodec/mimic.c | 4 ++--
>> libavcodec/mpeg12dec.c | 2 +-
>> libavcodec/mpeg4videodec.c | 2 +-
>> libavcodec/pngdec.c | 2 +-
>> libavcodec/takdec.c | 4 ++--
>> libavcodec/tta.c | 4 ++--
>> libavcodec/vp3.c | 4 ++--
>> libavcodec/vp8.c | 4 ++--
>> libavcodec/vp9.c | 2 +-
>> libavcodec/wavpack.c | 2 +-
>> 17 files changed, 23 insertions(+), 23 deletions(-)
>>
>
> but they are used when threading is enabled
Yes, but AFAIK, av_unused (or really its expansion
__attribute__((unused))) merely silences the warnings and does not
remove the functions. Michael's point is that he prefers this instead
of actual removal via the preprocessor. I personally am fine either
way.
More information about the ffmpeg-devel
mailing list