diff options
author | Yann Collet <Cyan4973@users.noreply.github.com> | 2017-06-19 06:55:45 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-19 06:55:45 (GMT) |
commit | 1525fd1f52940e9acb0df094b3e6ee5d0a36e4f3 (patch) | |
tree | 7f92fa5767c0987ea14d38fef38be40d79add336 | |
parent | 7982a905e2cda25f60a0de271c78c533b324ebca (diff) | |
parent | a4ec7fa7b7863e870d3b2ea8d2173083ae95ee95 (diff) | |
download | lz4-1525fd1f52940e9acb0df094b3e6ee5d0a36e4f3.zip lz4-1525fd1f52940e9acb0df094b3e6ee5d0a36e4f3.tar.gz lz4-1525fd1f52940e9acb0df094b3e6ee5d0a36e4f3.tar.bz2 |
Merge pull request #367 from Chocobo1/fallthrough
Fix gcc7 Wimplicit-fallthrough warnings
-rw-r--r-- | lib/lz4frame.c | 6 | ||||
-rw-r--r-- | lib/lz4hc.c | 2 | ||||
-rw-r--r-- | programs/lz4cli.c | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/lz4frame.c b/lib/lz4frame.c index fb37789..994cc8b 100644 --- a/lib/lz4frame.c +++ b/lib/lz4frame.c @@ -1096,7 +1096,7 @@ size_t LZ4F_decompress(LZ4F_dctx* dctxPtr, if (srcEnd-srcPtr == 0) return minFHSize; /* 0-size input */ dctxPtr->tmpInTarget = minFHSize; /* minimum to attempt decode */ dctxPtr->dStage = dstage_storeHeader; - /* pass-through */ + /* fall-through */ case dstage_storeHeader: { size_t sizeToCopy = dctxPtr->tmpInTarget - dctxPtr->tmpInSize; @@ -1138,7 +1138,7 @@ size_t LZ4F_decompress(LZ4F_dctx* dctxPtr, dctxPtr->tmpOutSize = 0; dctxPtr->dStage = dstage_getCBlockSize; - /* pass-through */ + /* fall-through */ case dstage_getCBlockSize: if ((size_t)(srcEnd - srcPtr) >= BHSize) { @@ -1236,8 +1236,8 @@ size_t LZ4F_decompress(LZ4F_dctx* dctxPtr, } selectedIn = dctxPtr->tmpIn; dctxPtr->dStage = dstage_decodeCBlock; - /* pass-through */ } + /* fall-through */ case dstage_decodeCBlock: if ((size_t)(dstEnd-dstPtr) < dctxPtr->maxBlockSize) /* not enough place into dst : decode into tmpOut */ diff --git a/lib/lz4hc.c b/lib/lz4hc.c index a423aea..ca9c2e6 100644 --- a/lib/lz4hc.c +++ b/lib/lz4hc.c @@ -555,7 +555,7 @@ static int LZ4HC_compress_generic ( return LZ4HC_compress_optimal(ctx, src, dst, *srcSizePtr, dstCapacity, limit, 128, 0); default: cLevel = 12; - /* pass-through */ + /* fall-through */ case 12: ctx->searchNum = LZ4HC_getSearchNum(cLevel); return LZ4HC_compress_optimal(ctx, src, dst, *srcSizePtr, dstCapacity, limit, LZ4_OPT_NUM, 1); diff --git a/programs/lz4cli.c b/programs/lz4cli.c index f3583ef..55f3133 100644 --- a/programs/lz4cli.c +++ b/programs/lz4cli.c @@ -469,8 +469,9 @@ int main(int argc, const char** argv) #ifdef UTIL_HAS_CREATEFILELIST /* recursive */ - case 'r': recursive=1; /* without break */ + case 'r': recursive=1; #endif + /* fall-through */ /* Treat non-option args as input files. See https://code.google.com/p/lz4/issues/detail?id=151 */ case 'm': multiple_inputs=1; break; |