1
0
mirror of https://github.com/upx/upx synced 2025-09-28 19:06:07 +08:00

Silence some pedantic warnings.

This commit is contained in:
Markus F.X.J. Oberhumer 2016-09-28 11:29:20 +02:00
parent 4134a512b9
commit f1d713ebf6
3 changed files with 8 additions and 5 deletions

View File

@ -101,7 +101,7 @@ int upx_compress ( const upx_bytep src, unsigned src_len,
cresult->c_len = 0; cresult->c_len = 0;
#endif #endif
if (0) { if __acc_cte(0) {
} }
#if (WITH_LZMA) #if (WITH_LZMA)
else if (M_IS_LZMA(method)) else if (M_IS_LZMA(method))
@ -147,7 +147,7 @@ int upx_decompress ( const upx_bytep src, unsigned src_len,
if (cresult && cresult->method == 0) if (cresult && cresult->method == 0)
cresult = NULL; cresult = NULL;
if (0) { if __acc_cte(0) {
} }
#if (WITH_LZMA) #if (WITH_LZMA)
else if (M_IS_LZMA(method)) else if (M_IS_LZMA(method))
@ -194,7 +194,7 @@ int upx_test_overlap ( const upx_bytep buf,
unsigned overlap_overhead = src_off + src_len - *dst_len; unsigned overlap_overhead = src_off + src_len - *dst_len;
assert((int)overlap_overhead > 0); assert((int)overlap_overhead > 0);
if (0) { if __acc_cte(0) {
} }
#if (WITH_LZMA) #if (WITH_LZMA)
else if (M_IS_LZMA(method)) else if (M_IS_LZMA(method))

View File

@ -33,6 +33,9 @@
#if (ACC_CC_MSC) #if (ACC_CC_MSC)
# pragma warning(disable: 4456) // -Wno-shadow # pragma warning(disable: 4456) // -Wno-shadow
#endif #endif
#if (ACC_CC_MSC && (_MSC_VER < 1900))
# pragma warning(disable: 4127) // warning C4127: conditional expression is constant
#endif
void lzma_compress_config_t::reset() void lzma_compress_config_t::reset()

View File

@ -42,9 +42,9 @@
#if (ACC_CC_MSC && (_MSC_VER >= 1000 && _MSC_VER < 1200)) #if (ACC_CC_MSC && (_MSC_VER >= 1000 && _MSC_VER < 1200))
/* avoid -W4 warnings in <conio.h> */ /* avoid -W4 warnings in <conio.h> */
#pragma warning(disable : 4032) #pragma warning(disable: 4032)
/* avoid -W4 warnings in <windows.h> */ /* avoid -W4 warnings in <windows.h> */
#pragma warning(disable : 4201 4214 4514) #pragma warning(disable: 4201 4214 4514)
#endif #endif
#if defined(__RSXNT__) #if defined(__RSXNT__)
#define timeval win32_timeval /* struct timeval already in <sys/time.h> */ #define timeval win32_timeval /* struct timeval already in <sys/time.h> */