aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2014-11-30 12:58:00 +0100
committerMohamad Ayyash <mkayyash@google.com>2015-02-23 17:26:20 -0800
commit55a6b23fae7a4f74ee8e06af1e9c19f56d1a2135 (patch)
treee478b0dde6dc6f5d301078b6051c0c87e05a4046
parentaa1246bbf1d1fe19e9cbe8a8b64716528ed2a751 (diff)
downloadlz4-55a6b23fae7a4f74ee8e06af1e9c19f56d1a2135.tar.gz
Fixed : some minor Visual warnings
-rw-r--r--lz4.c2
-rw-r--r--lz4hc.c4
-rw-r--r--programs/Makefile2
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