[FFmpeg-cvslog] avformat/format: silence -Wdiscarded-qualifiers

Ganesh Ajjanagadde git at videolan.org
Sun Sep 20 03:16:43 CEST 2015


ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Sat Sep 19 17:37:14 2015 -0400| [6ea457f76d9771e5669305ac71e3f436ad4f6dfc] | committer: Michael Niedermayer

avformat/format: silence -Wdiscarded-qualifiers

lpd.buf is non-const and discards the const qualifier of zerobuffer.
This fixes -Wdiscarded-qualifiers observed with a variety of compilers, including GCC 5.2.
Note that this does not change the type of zerobuffer, and merely makes the intent explicit.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/format.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/format.c b/libavformat/format.c
index fd81d7a..ffddb13 100644
--- a/libavformat/format.c
+++ b/libavformat/format.c
@@ -175,7 +175,7 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened,
     const static uint8_t zerobuffer[AVPROBE_PADDING_SIZE];
 
     if (!lpd.buf)
-        lpd.buf = zerobuffer;
+        lpd.buf = (unsigned char *) zerobuffer;
 
     if (lpd.buf_size > 10 && ff_id3v2_match(lpd.buf, ID3v2_DEFAULT_MAGIC)) {
         int id3len = ff_id3v2_tag_len(lpd.buf);



More information about the ffmpeg-cvslog mailing list