提交 58e09f2f 编写于 作者: T tickduan

gcc options error

上级 e1c79d48
......@@ -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 ()
......@@ -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)
......
......@@ -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 <stdlib.h>
#include <stdio.h>
......@@ -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
......@@ -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 <assert.h>
#include <stdio.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册