mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 06:40:16 -05:00
zstd: Suppress clang-analyzer warnings
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
#ifndef BITSTREAM_H_MODULE
|
||||
#define BITSTREAM_H_MODULE
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#if defined (__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -646,6 +646,10 @@ size_t FSE_compress_wksp (void* dst, size_t dstSize, const void* src, size_t src
|
||||
void* scratchBuffer = (void*)(CTable + CTableSize);
|
||||
size_t const scratchBufferSize = wkspSize - (CTableSize * sizeof(FSE_CTable));
|
||||
|
||||
#ifdef __clang_analyzer__
|
||||
memset(norm, 0, sizeof(norm));
|
||||
#endif
|
||||
|
||||
/* init conditions */
|
||||
if (wkspSize < FSE_COMPRESS_WKSP_SIZE_U32(tableLog, maxSymbolValue)) return ERROR(tableLog_tooLarge);
|
||||
if (srcSize <= 1) return 0; /* Not compressible */
|
||||
|
||||
@@ -40,6 +40,10 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __clang_analyzer__
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "divsufsort.h"
|
||||
|
||||
/*- Constants -*/
|
||||
@@ -1119,6 +1123,9 @@ tr_copy(int *ISA, const int *SA,
|
||||
|
||||
v = b - SA - 1;
|
||||
for(c = first, d = a - 1; c <= d; ++c) {
|
||||
#ifdef __clang_analyzer__
|
||||
assert(c);
|
||||
#endif
|
||||
if((0 <= (s = *c - depth)) && (ISA[s] == v)) {
|
||||
*++d = s;
|
||||
ISA[s] = d - SA;
|
||||
@@ -1184,6 +1191,10 @@ tr_introsort(int *ISA, const int *ISAd,
|
||||
int limit, next;
|
||||
int ssize, trlink = -1;
|
||||
|
||||
#ifdef __clang_analyzer__
|
||||
memset(stack, 0, sizeof(stack));
|
||||
#endif
|
||||
|
||||
for(ssize = 0, limit = tr_ilg(last - first);;) {
|
||||
|
||||
if(limit < 0) {
|
||||
|
||||
Reference in New Issue
Block a user