From: Zhao Zhili via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Brad Smith <brad@comstyle.com>, Zhao Zhili <quinkblack@foxmail.com> Subject: [FFmpeg-devel] Re: [PATCH] avformat/udp: fix warning about unused varible Date: Sat, 20 Sep 2025 18:11:35 +0800 Message-ID: <tencent_F13E7D3AAE123921C105B77468E601D1680A@qq.com> (raw) In-Reply-To: <aM5EWq_jFdaMm5Uf@humpty.home.comstyle.com> > On Sep 20, 2025, at 14:06, Brad Smith via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> wrote: > > libavformat/udp.c:283:9: warning: unused variable 'i' [-Wunused-variable] > > Signed-off-by: Brad Smith <brad@comstyle.com> > --- > libavformat/udp.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavformat/udp.c b/libavformat/udp.c > index e1dec49010..27b0147252 100644 > --- a/libavformat/udp.c > +++ b/libavformat/udp.c > @@ -282,13 +282,14 @@ static int udp_set_multicast_sources(URLContext *h, > struct sockaddr_storage *sources, > int nb_sources, int include) > { > +#if HAVE_STRUCT_IP_MREQ_SOURCE && (defined(MCAST_BLOCK_SOURCE) || defined(IP_BLOCK_SOURCE)) > int i; > +#endif > if (addr->sa_family != AF_INET) { > #if HAVE_STRUCT_GROUP_SOURCE_REQ && defined(MCAST_BLOCK_SOURCE) > /* For IPv4 prefer the old approach, as that alone works reliably on > * Windows and it also supports supplying the interface based on its > * address. */ > - int i; > for (i = 0; i < nb_sources; i++) { > struct group_source_req mreqs; > int level = addr->sa_family == AF_INET ? IPPROTO_IP : IPPROTO_IPV6; Use `for (int i = 0; ;;)` will be simpler. > -- > 2.51.0 > > _______________________________________________ > ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org > To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
prev parent reply other threads:[~2025-09-20 10:13 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-09-20 6:06 [FFmpeg-devel] " Brad Smith via ffmpeg-devel 2025-09-20 10:11 ` Zhao Zhili via ffmpeg-devel [this message]
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=tencent_F13E7D3AAE123921C105B77468E601D1680A@qq.com \ --to=ffmpeg-devel@ffmpeg.org \ --cc=brad@comstyle.com \ --cc=quinkblack@foxmail.com \ /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