> On Sep 20, 2025, at 14:06, Brad Smith via ffmpeg-devel 
> <[email protected]> wrote:
> 
> libavformat/udp.c:283:9: warning: unused variable 'i' [-Wunused-variable]
> 
> Signed-off-by: Brad Smith <[email protected]>
> ---
> 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 -- [email protected]
> To unsubscribe send an email to [email protected]

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to