[FFmpeg-devel] [PATCH] fftools/cmdutils: remove harmful variable shadowing

Anton Khirnov anton at khirnov.net
Wed Feb 21 17:58:13 EET 2024


It causes write_option() to return 0 when calling func_arg() fails.
---
 fftools/cmdutils.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 5e181a0d85..3d613a4018 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -339,8 +339,6 @@ static int write_option(void *optctx, const OptionDef *po, const char *opt,
 
         *(double *)dst = num;
     } else {
-        int ret;
-
         av_assert0(po->type == OPT_TYPE_FUNC && po->u.func_arg);
 
         ret = po->u.func_arg(optctx, opt, arg);
-- 
2.42.0



More information about the ffmpeg-devel mailing list