diff mbox series

[FFmpeg-devel,6/6] avutil/opt: Avoid av_uninit

Message ID GV1P250MB0737688BDB24B7CD835295C28F342@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit ba7980d9c0d189a4757dc48b34858f22e3ed3876
Headers show
Series [FFmpeg-devel,1/6] avcodec/libvpxenc: Only search for side data when intending to use it | 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

Andreas Rheinhardt March 27, 2024, 1:38 a.m. UTC
GCC 9-13 do not emit warnings for this at all optimization
levels even when -Wmaybe-uninitialized is not disabled.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavutil/opt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavutil/opt.c b/libavutil/opt.c
index 685206f416..fc54a5386d 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -1859,7 +1859,6 @@  int av_opt_set_from_string(void *ctx, const char *opts,
 {
     int ret, count = 0;
     const char *dummy_shorthand = NULL;
-    char *av_uninit(parsed_key), *av_uninit(value);
     const char *key;
 
     if (!opts)
@@ -1868,6 +1867,7 @@  int av_opt_set_from_string(void *ctx, const char *opts,
         shorthand = &dummy_shorthand;
 
     while (*opts) {
+        char *parsed_key, *value;
         ret = av_opt_get_key_value(&opts, key_val_sep, pairs_sep,
                                    *shorthand ? AV_OPT_FLAG_IMPLICIT_KEY : 0,
                                    &parsed_key, &value);