mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-11-06 05:17:42 +00:00
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 <lusoris@proton.me>
This commit is contained in:
1 parent
ccdf3805cf
commit
f675c507e2
1 file changed
+4
-4
+4
-4
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user