fix gcc-10 strict aliasing warnings

by exposing HUF_CElt declaration.
This commit is contained in:
Yann Collet
2020-12-04 16:43:19 -08:00
parent 68c14bdff2
commit 6132df8dd3
3 changed files with 8 additions and 10 deletions
-5
View File
@@ -102,11 +102,6 @@ static size_t HUF_compressWeights (void* dst, size_t dstSize, const void* weight
}
struct HUF_CElt_s {
U16 val;
BYTE nbBits;
}; /* typedef'd to HUF_CElt within "huf.h" */
/*! HUF_writeCTable() :
`CTable` : Huffman tree to save, using huf representation.
@return : size of saved CTable */
+1 -1
View File
@@ -63,7 +63,7 @@ typedef struct {
} ZSTD_localDict;
typedef struct {
U32 CTable[HUF_CTABLE_SIZE_U32(255)];
HUF_CElt CTable[HUF_CTABLE_SIZE_U32(255)];
HUF_repeat repeatMode;
} ZSTD_hufCTables_t;