Clang's static analyzer complains that leaving the variable uninitialized could lead to a code path where the uninitialized value is written to at the end of this function. This patch simply zero-initializes that variable to avoid that.
Unified · Split
| @@ -94,7 +94,7 @@ static void parse_waveformatex(AVFormatContext *s, AVIOContext *pb, AVCodecParam · 93 unmodified lines | ||
| 94 | 94 | int ff_get_wav_header(AVFormatContext *s, AVIOContext *pb, |
| 95 | 95 | AVCodecParameters *par, int size, int big_endian) |
| 96 | 96 | { |
| 97 | − int id, channels; | |
| 97 | + int id, channels = 0; | |
| 98 | 98 | uint64_t bitrate = 0; |
| 99 | 99 | |
| 100 | 100 | if (size < 14) { |