From f675c507e20ac78cd55f238ede52da470e6f6ec7 Mon Sep 17 00:00:00 2001 From: lusoris Date: Mon, 26 Oct 2026 11:58:37 +0100 Subject: [PATCH] avcodec/adpcm: mark conditionally used frame locals as unused GCC 14.4.0 and 16.2.1 report -Wunused-variable and -Wunused-but-set-variable warnings in adpcm_decode_frame with single-decoder configurations such as adpcm_xa, adpcm_swf, adpcm_sanyo and adpcm_ima_citrix. Reads of shared locals disappear when their CASE blocks are disabled. Mark c, samples, samples_p and st as av_unused to suppress both warnings for any subset of enabled decoders without changing behavior. Signed-off-by: lusoris --- libavcodec/adpcm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index d3d796fe18..759a90aaf4 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -1545,11 +1545,11 @@ static int adpcm_decode_frame(AVCodecContext *avctx, AVFrame *frame, { const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; - ADPCMDecodeContext *c = avctx->priv_data; + av_unused ADPCMDecodeContext *c = avctx->priv_data; int channels = avctx->ch_layout.nb_channels; - int16_t *samples; - int16_t **samples_p; - int st; /* stereo */ + av_unused int16_t *samples; + av_unused int16_t **samples_p; + av_unused int st; /* stereo */ int nb_samples, coded_samples, approx_nb_samples, ret; GetByteContext gb;