From c1b6583a190ace9247a1f81941d6be4382eb4f1e Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Thu, 5 Dec 2024 15:12:38 +0100 Subject: [PATCH] posix: fix warnings --- platform/posix/wav_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/posix/wav_util.c b/platform/posix/wav_util.c index b0aa0bcba..7f7c92151 100644 --- a/platform/posix/wav_util.c +++ b/platform/posix/wav_util.c @@ -192,7 +192,8 @@ int wav_reader_open(const char * filepath){ } uint8_t buf[40]; - fread(buf, 1, sizeof(buf), wav_reader_file); + size_t ret = fread(buf, 1, sizeof(buf), wav_reader_file); + btstack_assert( ret == sizeof(buf) ); wav_reader_state.num_channels = (uint8_t) little_endian_read_16(buf, 22); if ((wav_reader_state.num_channels < 1) || (wav_reader_state.num_channels > 2)) {