[FFmpeg-cvslog] avconv: add an assert to silence an uninitialized variable warning.

Anton Khirnov git at videolan.org
Wed Jun 27 02:07:42 CEST 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Jun 25 13:19:51 2012 +0200| [c29c1a1b6bade2b9118c7fa01239c622c2238656] | committer: Anton Khirnov

avconv: add an assert to silence an uninitialized variable warning.

The warning silenced was:
avconv.c: In function ‘opt_output_file’:
avconv.c:3380:21: warning: ‘meta_out’ may be used uninitialized in this function [-Wuninitialized]
avconv.c:3315:20: note: ‘meta_out’ was declared here

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c29c1a1b6bade2b9118c7fa01239c622c2238656
---

 avconv.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/avconv.c b/avconv.c
index 7aacbe0..3eb249d 100644
--- a/avconv.c
+++ b/avconv.c
@@ -3350,6 +3350,7 @@ static int copy_metadata(char *outspec, char *inspec, AVFormatContext *oc, AVFor
             METADATA_CHECK_INDEX(index, context->nb_programs, "program")\
             meta = &context->programs[index]->metadata;\
             break;\
+        default: av_assert0(0);\
         }\
 
     SET_DICT(type_in, meta_in, ic, idx_in);



More information about the ffmpeg-cvslog mailing list