diff --git a/.travis.yml b/.travis.yml index fda0b05b5..b7faed3eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ env: - ZSTD_TRAVIS_CI_ENV=cmaketest - ZSTD_TRAVIS_CI_ENV=clangtest - ZSTD_TRAVIS_CI_ENV=gpptest + - ZSTD_TRAVIS_CI_ENV=gnu90test - ZSTD_TRAVIS_CI_ENV=armtest-w-install - ZSTD_TRAVIS_CI_ENV=test - ZSTD_TRAVIS_CI_ENV="-C programs test32" diff --git a/Makefile b/Makefile index 0f6363cf5..5aad596d1 100644 --- a/Makefile +++ b/Makefile @@ -88,6 +88,9 @@ clangtest: clean gpptest: clean $(MAKE) all CC=g++ CFLAGS="-O3 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Werror" +gnu90test: clean + $(MAKE) all CFLAGS="-Wall -Wextra -Wcast-qual -Wcast-align -Wshadow -Wstrict-aliasing=1 -Wswitch-enum -Wstrict-prototypes -Wundef -Werror" + bmix64test: clean CFLAGS="-O3 -mbmi -Werror" $(MAKE) -C $(PRGDIR) test diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index 7b07eb454..1bb75c68c 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -852,7 +852,7 @@ MEM_STATIC void ZSTD_storeSeq(seqStore_t* seqStorePtr, size_t litLength, const B static const BYTE* g_start = NULL; const U32 pos = (U32)(literals - g_start); if (g_start==NULL) g_start = literals; - if ((pos > 5810300) && (pos < 5810500)) + if ((pos > 2587900) && (pos < 2588050)) printf("Cpos %6u :%5u literals & match %3u bytes at distance %6u \n", pos, (U32)litLength, (U32)matchCode+MINMATCH, (U32)offsetCode); #endif diff --git a/lib/decompress/huf_decompress.c b/lib/decompress/huf_decompress.c index 79e6fbae3..7637bd941 100644 --- a/lib/decompress/huf_decompress.c +++ b/lib/decompress/huf_decompress.c @@ -1118,7 +1118,7 @@ size_t HUF_decompress (void* dst, size_t dstSize, const void* cSrc, size_t cSrcS Dtime[1] += Dtime[1] >> 4; Dtime[2] += Dtime[2] >> 3; /* advantage to algorithms using less memory, for cache eviction */ if (Dtime[1] < Dtime[0]) algoNb = 1; - if (Dtime[2] < Dtime[algoNb]) algoNb = 2; + //if (Dtime[2] < Dtime[algoNb]) algoNb = 2; return decompress[algoNb](dst, dstSize, cSrc, cSrcSize); diff --git a/programs/paramgrill.c b/programs/paramgrill.c index f36a6916f..566197f55 100644 --- a/programs/paramgrill.c +++ b/programs/paramgrill.c @@ -44,6 +44,9 @@ #if defined(_MSC_VER) # define snprintf _snprintf /* snprintf unsupported by Visual <= 2012 */ +#elif defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) +#else +# define snprintf(b, s, ...) sprintf(b, __VA_ARGS__) #endif