From 8ede2ebced13ea74b391448d7e3fb49cb6a8d522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Heusipp?= Date: Mon, 2 Dec 2024 10:32:06 +0000 Subject: [PATCH] Merged revision(s) 22447 from trunk/OpenMPT: [Ref] IT Compression: Make clang static analyzer happy. ........ git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.30@22449 56274372-70c3-4bfc-bfc3-4c3a0b034d27 --- soundlib/ITCompression.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/soundlib/ITCompression.cpp b/soundlib/ITCompression.cpp index d83731b9094..0908f94ab8a 100644 --- a/soundlib/ITCompression.cpp +++ b/soundlib/ITCompression.cpp @@ -154,10 +154,11 @@ void ITCompression::CompressBlock(const typename Properties::sample_t *data, Smp { if(bwt[i] != width) { + MPT_ASSERT(width >= 0); if(width <= 6) { // Mode A: 1 to 6 bits - MPT_ASSERT(width); + MPT_ASSERT(width != 0); WriteBits(width, (1 << (width - 1))); WriteBits(Properties::fetchA, ConvertWidth(width, bwt[i])); } else if(width < Properties::defWidth)