diff mbox series

[FFmpeg-devel,01/60] fftools/ffmpeg_opt: fix variable shadowing

Message ID D41CE2FHUKJS.3JT42UG2S21VV@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,01/60] fftools/ffmpeg_opt: fix variable shadowing | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Marvin Scholz Sept. 8, 2024, 5:14 p.m. UTC
---
 fftools/ffmpeg_opt.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)


base-commit: 7e35aeda03e7feb0ec32b7da63f5091047a9cefe

Comments

Anton Khirnov Sept. 9, 2024, 10:07 a.m. UTC | #1
Quoting Marvin Scholz (2024-09-08 19:14:10)
> ---
>  fftools/ffmpeg_opt.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Ok
Michael Niedermayer Sept. 11, 2024, 12:18 p.m. UTC | #2
On Sun, Sep 08, 2024 at 07:14:10PM +0200, Marvin Scholz wrote:
> ---
>  fftools/ffmpeg_opt.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

btw, iam not sure its needed to post patches for things like
shadow fixes. Maybe we can fix the shadowing stuff quicker without posting
patches also as these are quite trivial (i mean the trivial ones only of course)

thx

[...]
diff mbox series

Patch

diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 3cbf0795ac..1aa187f706 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -87,8 +87,6 @@  int recast_media = 0;
 
 static void uninit_options(OptionsContext *o)
 {
-    int i;
-
     /* all OPT_SPEC and OPT_TYPE_STRING can be freed in generic way */
     for (const OptionDef *po = options; po->name; po++) {
         void *dst;
@@ -112,11 +110,11 @@  static void uninit_options(OptionsContext *o)
             av_freep(dst);
     }
 
-    for (i = 0; i < o->nb_stream_maps; i++)
+    for (int i = 0; i < o->nb_stream_maps; i++)
         av_freep(&o->stream_maps[i].linklabel);
     av_freep(&o->stream_maps);
 
-    for (i = 0; i < o->nb_attachments; i++)
+    for (int i = 0; i < o->nb_attachments; i++)
         av_freep(&o->attachments[i]);
     av_freep(&o->attachments);