The variables huffcount, rsrc_size and data_size were all set but not used. Therefore they have been removed. This entailed a chance to compactify calls to avio_skip; it has been used while retaining the information about the offsets of the huffcount etc. fields as comments.
This fixes -Wunused-but-set-variable warnings in GCC. Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@gmail.com> --- libavformat/hcom.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libavformat/hcom.c b/libavformat/hcom.c index 0d1736b620..9efbc3f434 100644 --- a/libavformat/hcom.c +++ b/libavformat/hcom.c @@ -38,17 +38,12 @@ static int hcom_probe(const AVProbeData *p) static int hcom_read_header(AVFormatContext *s) { AVStream *st; - unsigned data_size, rsrc_size, huffcount; unsigned compresstype, divisor; unsigned dict_entries; int ret; - avio_skip(s->pb, 83); - data_size = avio_rb32(s->pb); - rsrc_size = avio_rb32(s->pb); - avio_skip(s->pb, 128-91+4); - huffcount = avio_rb32(s->pb); - avio_skip(s->pb, 4); + avio_skip(s->pb, 83 + /* data_size */ 4 + /* rsrc_size */ 4 + + 128 - 91 + 4 + /* huffcount */ 4 + 4); compresstype = avio_rb32(s->pb); if (compresstype > 1) return AVERROR_INVALIDDATA; -- 2.21.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".