1
0
mirror of https://github.com/facebook/zstd.git synced 2025-08-30 17:21:13 +03:00

fix alignment test

for non 64-bit systems
This commit is contained in:
Yann Collet
2024-10-18 11:20:54 -07:00
parent 85e98dfc05
commit ab44689a44

View File

@@ -8,6 +8,7 @@
* You may select, at your option, one of the above-listed licenses.
*/
#include "../common/compiler.h" /* ZSTD_ALIGNOF */
#include "../common/mem.h" /* S64 */
#include "../common/zstd_deps.h" /* ZSTD_memset */
#include "../common/zstd_internal.h" /* ZSTD_STATIC_ASSERT */
@@ -134,7 +135,7 @@ size_t ZSTD_splitBlock_4k(const void* src, size_t srcSize,
if (srcSize <= blockSizeMax) return srcSize;
assert(blockSizeMax == (128 << 10));
assert(workspace != NULL);
assert((size_t)workspace % 8 == 0);
assert((size_t)workspace % ZSTD_ALIGNOF(FPStats) == 0);
ZSTD_STATIC_ASSERT(ZSTD_SLIPBLOCK_WORKSPACESIZE == sizeof(FPStats));
assert(wkspSize >= sizeof(FPStats)); (void)wkspSize;