fixed several minor issues detected by scan-build

only notable one :
writeNCount() resists better vs invalid distributions
(though it should never happen within zstd anyway)
This commit is contained in:
Yann Collet
2018-08-14 16:55:35 -07:00
parent a25d8000ec
commit 6e66bbf5dd
10 changed files with 67 additions and 56 deletions
+1 -2
View File
@@ -79,8 +79,7 @@ static const U32 repStartValue[ZSTD_REP_NUM] = { 1, 4, 8 };
static const size_t ZSTD_fcs_fieldSize[4] = { 0, 2, 4, 8 };
static const size_t ZSTD_did_fieldSize[4] = { 0, 1, 2, 4 };
#define ZSTD_FRAMEIDSIZE 4
static const size_t ZSTD_frameIdSize = ZSTD_FRAMEIDSIZE; /* magic number size */
#define ZSTD_FRAMEIDSIZE 4 /* magic number size */
#define ZSTD_BLOCKHEADERSIZE 3 /* C standard doesn't allow `static const` variable to be init using another `static const` variable */
static const size_t ZSTD_blockHeaderSize = ZSTD_BLOCKHEADERSIZE;