Browse Source

ffprobe: fix uninitialized variable warning

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.
tags/n2.1
Stefano Sabatini 12 years ago
parent
commit
7bac6e5cf8
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      ffprobe.c

+ 1
- 1
ffprobe.c View File

@@ -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);


Loading…
Cancel
Save