From 5eef983297b5e2eaa785f1e832622480eaa84103 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Fri, 11 Dec 2015 12:26:19 +0100 Subject: [PATCH 1/3] ape: Restructure DEBUG ifdefs to avoid unused function parameter warnings --- libavformat/ape.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/ape.c b/libavformat/ape.c index 80e3372403..010b795c59 100644 --- a/libavformat/ape.c +++ b/libavformat/ape.c @@ -94,9 +94,9 @@ static int ape_probe(AVProbeData * p) return 0; } +#ifdef DEBUG static void ape_dumpinfo(AVFormatContext * s, APEContext * ape_ctx) { -#ifdef DEBUG int i; av_log(s, AV_LOG_DEBUG, "Descriptor Block:\n\n"); @@ -154,8 +154,10 @@ static void ape_dumpinfo(AVFormatContext * s, APEContext * ape_ctx) av_log(s, AV_LOG_DEBUG, "junklength = %"PRIu32"\n", ape_ctx->junklength); av_log(s, AV_LOG_DEBUG, "firstframe = %"PRIu32"\n", ape_ctx->firstframe); av_log(s, AV_LOG_DEBUG, "totalsamples = %"PRIu32"\n", ape_ctx->totalsamples); -#endif } +#else +#define ape_dumpinfo(s, ape_ctx) do {} while(0) +#endif static int ape_read_header(AVFormatContext * s) { From 367f95af555d096bbc448f185f1902378b2fe805 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Fri, 11 Dec 2015 20:46:56 +0100 Subject: [PATCH 2/3] ac3enc: Restructure DEBUG ifdefs to avoid unused function parameter warnings --- libavcodec/ac3enc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index da141e1acb..48bc2e79de 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -1676,9 +1676,9 @@ void ff_ac3_output_frame(AC3EncodeContext *s, unsigned char *frame) } +#ifdef DEBUG static void dprint_options(AC3EncodeContext *s) { -#ifdef DEBUG AVCodecContext *avctx = s->avctx; AC3EncOptions *opt = &s->options; char strbuf[32]; @@ -1787,8 +1787,10 @@ static void dprint_options(AC3EncodeContext *s) ff_dlog(avctx, "extended bitstream info 2: {not written}\n"); } } -#endif } +#else +#define dprint_options(x) do {} while(0) +#endif #define FLT_OPTION_THRESHOLD 0.01 From 6427379f23eb4d2b82d8d274c616f68b65a2f723 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Fri, 11 Dec 2015 21:08:48 +0100 Subject: [PATCH 3/3] als: Restructure DEBUG ifdefs to avoid unused function parameter warnings --- libavcodec/alsdec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index f356a70104..af514870ef 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -246,9 +246,9 @@ typedef struct ALSBlockData { } ALSBlockData; +#ifdef DEBUG static av_cold void dprint_specific_config(ALSDecContext *ctx) { -#ifdef DEBUG AVCodecContext *avctx = ctx->avctx; ALSSpecificConfig *sconf = &ctx->sconf; @@ -270,8 +270,10 @@ static av_cold void dprint_specific_config(ALSDecContext *ctx) ff_dlog(avctx, "chan_sort = %i\n", sconf->chan_sort); ff_dlog(avctx, "RLSLMS = %i\n", sconf->rlslms); ff_dlog(avctx, "chan_config_info = %i\n", sconf->chan_config_info); -#endif } +#else +#define dprint_specific_config(x) do {} while(0) +#endif /** Read an ALSSpecificConfig from a buffer into the output struct.