From 55a6b23fae7a4f74ee8e06af1e9c19f56d1a2135 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Sun, 30 Nov 2014 12:58:00 +0100 Subject: Fixed : some minor Visual warnings --- lz4.c | 2 +- lz4hc.c | 4 ++++ programs/Makefile | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lz4.c b/lz4.c index 9439b360..fb84955e 100644 --- a/lz4.c +++ b/lz4.c @@ -369,7 +369,7 @@ static unsigned LZ4_NbCommonBytes (register size_t val) { # if defined(_MSC_VER) && !defined(LZ4_FORCE_SW_BITCOUNT) unsigned long r = 0; - _BitScanReverse( &r, val ); + _BitScanReverse( &r, (unsigned long)val ); return (unsigned)(r>>3); # elif defined(__GNUC__) && (GCC_VERSION >= 304) && !defined(LZ4_FORCE_SW_BITCOUNT) return (__builtin_clz(val) >> 3); diff --git a/lz4hc.c b/lz4hc.c index a798cab7..89f0db0a 100644 --- a/lz4hc.c +++ b/lz4hc.c @@ -57,6 +57,10 @@ You can contact the author at : # pragma clang diagnostic ignored "-Wunused-function" #endif +#if defined(_MSC_VER) /* Visual Studio */ +# pragma warning(disable : 4201) /* disable: C4201: unnamed struct/union*/ +#endif + /************************************** Common LZ4 definition diff --git a/programs/Makefile b/programs/Makefile index fcfb32c5..8a3ed95c 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -193,7 +193,7 @@ test-mem: lz4 datagen fuzzer frametest ./datagen -g16MB > tmp valgrind --leak-check=yes ./lz4 -9 -B5D -f tmp /dev/null ./datagen -g256MB > tmp - valgrind --leak-check=yes ./lz4 -B4D -f tmp /dev/null + valgrind --leak-check=yes ./lz4 -B4D -f -vq tmp /dev/null rm tmp valgrind --leak-check=yes ./fuzzer -i50 -t0 valgrind --leak-check=yes ./frametest -i100 -- cgit v1.2.3