From: Yann Collet Date: Fri, 9 Feb 2018 23:34:59 +0000 (-0800) Subject: fixed gcc warning on a switch code path X-Git-Tag: v1.3.4~1^2~39^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04a3f85ce7ea2738e246cacfdb9c8827efcd9d90;p=thirdparty%2Fzstd.git fixed gcc warning on a switch code path --- diff --git a/lib/decompress/zstd_decompress.c b/lib/decompress/zstd_decompress.c index c72fc71d8..17139d8ce 100644 --- a/lib/decompress/zstd_decompress.c +++ b/lib/decompress/zstd_decompress.c @@ -760,6 +760,7 @@ static size_t ZSTD_buildSeqTable(FSE_DTable* DTableSpace, const FSE_DTable** DTa } default : /* impossible */ assert(0); + return ERROR(GENERIC); } } diff --git a/programs/bench.c b/programs/bench.c index 843920c89..939890064 100644 --- a/programs/bench.c +++ b/programs/bench.c @@ -461,8 +461,8 @@ static int BMK_benchMem(const void* srcBuffer, size_t srcSize, } /* for (testNb = 1; testNb <= (g_nbSeconds + !g_nbSeconds); testNb++) */ if (g_displayLevel == 1) { /* hidden display mode -q, used by python speed benchmark */ - double cSpeed = (double)srcSize / fastestC; - double dSpeed = (double)srcSize / fastestD; + double const cSpeed = (double)srcSize / fastestC; + double const dSpeed = (double)srcSize / fastestD; if (g_additionalParam) DISPLAY("-%-3i%11i (%5.3f) %6.2f MB/s %6.1f MB/s %s (param=%d)\n", cLevel, (int)cSize, ratio, cSpeed, dSpeed, displayName, g_additionalParam); else