[vlc-commits] [Git][videolan/vlc][master] 2 commits: demux: asf: fix shadowed declaration
Steve Lhomme (@robUx4)
gitlab at videolan.org
Sat Sep 12 10:47:26 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
7838252e by Alexandre Janniaux at 2026-09-12T10:36:35+00:00
demux: asf: fix shadowed declaration
The Control function declares a int i; at the beginning.
../modules/demux/asf/asf.c: In function ‘Control’:
../modules/demux/asf/asf.c:590:18: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local]
590 | for( int i = 0; i < p_sys->i_seekpoints; i++ )
| ^
../modules/demux/asf/asf.c:449:17: note: shadowed declaration is here
449 | int i;
| ^
This was introduced in 84db002877000d02e985c6cbcde6026626fc35ff.
- - - - -
549f69fb by Alexandre Janniaux at 2026-09-12T10:36:35+00:00
demux/asf: remove `int i` declaration
The Control() function dispatches a lot of cases and having a generic
`i` being declared is a recipee for shadowed variable warnings.
- - - - -
1 changed file:
- modules/demux/asf/asf.c
Changes:
=====================================
modules/demux/asf/asf.c
=====================================
@@ -446,7 +446,6 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
demux_sys_t *p_sys = p_demux->p_sys;
vlc_meta_t *p_meta;
vlc_tick_t i64;
- int i;
double f, *pf;
switch( i_query )
@@ -481,7 +480,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
case DEMUX_SET_ES:
{
- i = va_arg( args, int );
+ int i = va_arg( args, int );
int i_ret;
if ( i >= 0 )
{
@@ -587,9 +586,9 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
return VLC_ENOMEM;
}
- for( int i = 0; i < p_sys->i_seekpoints; i++ )
+ for( int sp_id = 0; sp_id < p_sys->i_seekpoints; sp_id++ )
{
- seekpoint_t *p_sp = vlc_seekpoint_Duplicate( p_sys->pp_seekpoints[i] );
+ seekpoint_t *p_sp = vlc_seekpoint_Duplicate( p_sys->pp_seekpoints[sp_id] );
if( unlikely(!p_sp) )
break;
TAB_APPEND( p_title->i_seekpoint, p_title->seekpoint, p_sp );
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5f9eca0b5801879ff5a88a384253cda39890f705...549f69fb1ba3455de103c80cbb746d6d15e1f84b
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/5f9eca0b5801879ff5a88a384253cda39890f705...549f69fb1ba3455de103c80cbb746d6d15e1f84b
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list