From 58e09f2faa13c5e5a70a88119afcbfeb09c820bb Mon Sep 17 00:00:00 2001 From: tickduan <417921451@qq.com> Date: Thu, 8 Jul 2021 19:11:10 +0800 Subject: [PATCH] gcc options error --- deps/SZ/CMakeLists.txt | 7 ++++--- deps/SZ/sz/src/ByteToolkit.c | 4 ++-- deps/SZ/sz/src/CompressElement.c | 11 +++++++---- deps/SZ/zstd/dictBuilder/divsufsort.c | 4 ---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/deps/SZ/CMakeLists.txt b/deps/SZ/CMakeLists.txt index 3aa7955f40..badb218087 100644 --- a/deps/SZ/CMakeLists.txt +++ b/deps/SZ/CMakeLists.txt @@ -18,11 +18,12 @@ AUX_SOURCE_DIRECTORY(zstd/legacy SRC7) AUX_SOURCE_DIRECTORY(zstd/dictBuilder SRC8) - # archive ADD_LIBRARY(SZ STATIC ${SRC1} ${SRC2} ${SRC3} ${SRC4} ${SRC5} ${SRC6} ${SRC7} ${SRC8}) -#SET_TARGET_PROPERTIES(SZ PROPERTIES COMPILE_FLAGS -w) - +# windows ignore warning +IF (TD_WINDOWS) + SET_TARGET_PROPERTIES(SZ PROPERTIES COMPILE_FLAGS -w) +ENDIF () diff --git a/deps/SZ/sz/src/ByteToolkit.c b/deps/SZ/sz/src/ByteToolkit.c index f7d31309a5..70b3a00fa7 100644 --- a/deps/SZ/sz/src/ByteToolkit.c +++ b/deps/SZ/sz/src/ByteToolkit.c @@ -288,9 +288,9 @@ inline size_t bytesToSize(unsigned char* bytes) inline void sizeToBytes(unsigned char* outBytes, size_t size) { if(exe_params->SZ_SIZE_TYPE==4) - intToBytes_bigEndian(outBytes, size);//4 + intToBytes_bigEndian(outBytes, (unsigned int)size);//4 else - longToBytes_bigEndian(outBytes, size);//8 + longToBytes_bigEndian(outBytes, (unsigned long)size);//8 } void convertSZParamsToBytes(sz_params* params, unsigned char* result) diff --git a/deps/SZ/sz/src/CompressElement.c b/deps/SZ/sz/src/CompressElement.c index 2b50f7c79d..50660989f4 100644 --- a/deps/SZ/sz/src/CompressElement.c +++ b/deps/SZ/sz/src/CompressElement.c @@ -6,9 +6,10 @@ * (C) 2015 by Mathematics and Computer Science (MCS), Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ - -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wchar-subscripts" +#ifndef WINDOWS + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wchar-subscripts" +#endif #include #include @@ -231,4 +232,6 @@ inline void updateLossyCompElement_Float(unsigned char* diffBytes, unsigned char lce->residualMidBits = resiBits; } -#pragma GCC diagnostic pop +#ifndef WINDOWS + #pragma GCC diagnostic pop +#endif \ No newline at end of file diff --git a/deps/SZ/zstd/dictBuilder/divsufsort.c b/deps/SZ/zstd/dictBuilder/divsufsort.c index 60cceb0883..f6ffed9dbb 100644 --- a/deps/SZ/zstd/dictBuilder/divsufsort.c +++ b/deps/SZ/zstd/dictBuilder/divsufsort.c @@ -25,16 +25,12 @@ */ /*- Compiler specifics -*/ -#ifdef __clang__ -#pragma clang diagnostic ignored "-Wshorten-64-to-32" -#endif #if defined(_MSC_VER) # pragma warning(disable : 4244) # pragma warning(disable : 4127) /* C4127 : Condition expression is constant */ #endif - /*- Dependencies -*/ #include #include -- GitLab