From 04a3f85ce7ea2738e246cacfdb9c8827efcd9d90 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Fri, 9 Feb 2018 15:34:59 -0800 Subject: [PATCH] fixed gcc warning on a switch code path --- lib/decompress/zstd_decompress.c | 1 + programs/bench.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/decompress/zstd_decompress.c b/lib/decompress/zstd_decompress.c index c72fc71d..17139d8c 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 843920c8..93989006 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