From 7bac6e5cf81b1f956f06d15546a376e32f4ea558 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Mon, 23 Sep 2013 14:10:52 +0200 Subject: [PATCH] ffprobe: fix uninitialized variable warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix warning: ffprobe.c:1684:21: warning: ‘start’ may be used uninitialized in this function [-Wmaybe-uninitialized] end = start + interval->end; The warning is a false positive, since the variable is accessed only if has_start is set, and in that case start has been already set. --- ffprobe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffprobe.c b/ffprobe.c index bbcdc975e5..8b1a584ab3 100644 --- a/ffprobe.c +++ b/ffprobe.c @@ -1636,7 +1636,7 @@ static int read_interval_packets(WriterContext *w, AVFormatContext *fmt_ctx, AVPacket pkt, pkt1; AVFrame frame; int ret = 0, i = 0, frame_count = 0; - int64_t start, end = interval->end; + int64_t start = -INT64_MAX, end = interval->end; int has_start = 0, has_end = interval->has_end && !interval->end_is_offset; av_init_packet(&pkt);