Skip to content

Commit

Permalink
avformat/format: silence -Wdiscarded-qualifiers
Browse files Browse the repository at this point in the history
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@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
  • Loading branch information
Ganesh Ajjanagadde authored and michaelni committed Sep 20, 2015
1 parent 7cf22c7 commit 6ea457f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libavformat/format.c
Expand Up @@ -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);
Expand Down

0 comments on commit 6ea457f

Please sign in to comment.