diff mbox series

[FFmpeg-devel,V2,7/7] libavutil/opt.c: fix build warning for [-Wdiscarded-qualifiers]

Message ID 20210225063816.8644-7-yejun.guo@intel.com
State New
Headers show
Series [FFmpeg-devel,V2,1/7] libavdevice/v4l2.c: fix build warning for [-Wformat-truncation=] | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Guo, Yejun Feb. 25, 2021, 6:38 a.m. UTC
src/libavutil/opt.c: In function ‘av_opt_child_class_iterate’:
src/libavutil/opt.c:1738:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
         *iter = parent->child_class_next(*iter);
               ^

Signed-off-by: Guo, Yejun <yejun.guo@intel.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 590146b5fb..c47146c47f 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -1735,7 +1735,7 @@  const AVClass *av_opt_child_class_iterate(const AVClass *parent, void **iter)
 #if FF_API_CHILD_CLASS_NEXT
 FF_DISABLE_DEPRECATION_WARNINGS
     if (parent->child_class_next) {
-        *iter = parent->child_class_next(*iter);
+        *iter = (void *)parent->child_class_next(*iter);
         return *iter;
     }
 FF_ENABLE_DEPRECATION_WARNINGS