Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: mkver via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: mkver <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] Avoid av_unused (PR #20866)
Date: Sat, 08 Nov 2025 16:17:26 -0000
Message-ID: <176261864721.25.7745019069955276549@2cb04c0e5124> (raw)

PR #20866 opened by mkver
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20866
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20866.patch


>From 41631b48d2392f83130c734b26f7c9fdb8415f5a Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Sat, 8 Nov 2025 17:02:13 +0100
Subject: [PATCH 1/2] swresample/swresample: Avoid av_unused

Possible now that -Wdeclaration-after-statement is no longer used.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libswresample/swresample.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libswresample/swresample.c b/libswresample/swresample.c
index 40485a019c..e7ce4a10aa 100644
--- a/libswresample/swresample.c
+++ b/libswresample/swresample.c
@@ -720,14 +720,13 @@ int attribute_align_arg swr_convert(struct SwrContext *s,
 {
     AudioData * in= &s->in;
     AudioData *out= &s->out;
-    av_unused int max_output;
 
     if (!swr_is_initialized(s)) {
         av_log(s, AV_LOG_ERROR, "Context has not been initialized\n");
         return AVERROR(EINVAL);
     }
 #if defined(ASSERT_LEVEL) && ASSERT_LEVEL >1
-    max_output = swr_get_out_samples(s, in_count);
+    int max_output = swr_get_out_samples(s, in_count);
 #endif
 
     while(s->drop_output > 0){
-- 
2.49.1


>From 6e02e7f5fea48b945ef7abece00d610350b6d079 Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Sat, 8 Nov 2025 17:15:57 +0100
Subject: [PATCH 2/2] avformat/mp3enc: Avoid av_unused

Possible now that -Wdeclaration-after-statement is no more.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavformat/mp3enc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index 0ebd480d3f..724c7269dc 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -322,7 +322,6 @@ static int mp3_write_audio_packet(AVFormatContext *s, AVPacket *pkt)
     if (pkt->data && pkt->size >= 4) {
         MPADecodeHeader mpah;
         int ret;
-        av_unused int base;
         uint32_t h;
 
         h = AV_RB32(pkt->data);
@@ -339,7 +338,7 @@ static int mp3_write_audio_packet(AVFormatContext *s, AVPacket *pkt)
 
 #ifdef FILTER_VBR_HEADERS
         /* filter out XING and INFO headers. */
-        base = 4 + xing_offtbl[mpah.lsf == 1][mpah.nb_channels == 1];
+        int base = 4 + xing_offtbl[mpah.lsf == 1][mpah.nb_channels == 1];
 
         if (base + 4 <= pkt->size) {
             uint32_t v = AV_RB32(pkt->data + base);
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

                 reply	other threads:[~2025-11-08 16:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=176261864721.25.7745019069955276549@2cb04c0e5124 \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=code@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git