summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-22 13:54:25 (GMT)
committerBrad King <brad.king@kitware.com>2023-05-22 20:51:15 (GMT)
commit91e4d27765945e27b623fbb4e3a066ee9157970a (patch)
tree6ab5195d3801eb495d480c1b6025c6ee7470dd2c
parente090f348d3d74f984bafd828ee36ed75b55d4076 (diff)
downloadCMake-91e4d27765945e27b623fbb4e3a066ee9157970a.zip
CMake-91e4d27765945e27b623fbb4e3a066ee9157970a.tar.gz
CMake-91e4d27765945e27b623fbb4e3a066ee9157970a.tar.bz2
bzip2: Suppress clang-analyzer warnings
-rw-r--r--Utilities/cmbzip2/bzlib.c4
-rw-r--r--Utilities/cmbzip2/compress.c8
2 files changed, 12 insertions, 0 deletions
diff --git a/Utilities/cmbzip2/bzlib.c b/Utilities/cmbzip2/bzlib.c
index 2178655..af3673d 100644
--- a/Utilities/cmbzip2/bzlib.c
+++ b/Utilities/cmbzip2/bzlib.c
@@ -444,6 +444,10 @@ int BZ_API(BZ2_bzCompress) ( bz_stream *strm, int action )
if (s->avail_in_expect != s->strm->avail_in)
return BZ_SEQUENCE_ERROR;
progress = handle_compress ( strm );
+ #ifdef __clang_analyzer__
+ /* Tolerate deadcode.DeadStores to avoid modifying upstream. */
+ (void)progress;
+ #endif
if (s->avail_in_expect > 0 || !isempty_RL(s) ||
s->state_out_pos < s->numZ) return BZ_FLUSH_OK;
s->mode = BZ_M_RUNNING;
diff --git a/Utilities/cmbzip2/compress.c b/Utilities/cmbzip2/compress.c
index 5dfa002..a044c16 100644
--- a/Utilities/cmbzip2/compress.c
+++ b/Utilities/cmbzip2/compress.c
@@ -151,6 +151,10 @@ void generateMTFValues ( EState* s )
UChar* block = s->block;
UInt16* mtfv = s->mtfv;
+#ifdef __clang_analyzer__
+ memset(yy, 0, sizeof(yy));
+#endif
+
makeMaps_e ( s );
EOB = s->nInUse+1;
@@ -223,6 +227,10 @@ void generateMTFValues ( EState* s )
zPend = (zPend - 2) / 2;
};
zPend = 0;
+ #ifdef __clang_analyzer__
+ /* Tolerate deadcode.DeadStores to avoid modifying upstream. */
+ (void)zPend;
+ #endif
}
mtfv[wr] = EOB; wr++; s->mtfFreq[EOB]++;