summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChocobo1 <Chocobo1@users.noreply.github.com>2017-06-19 05:09:36 (GMT)
committerChocobo1 <Chocobo1@users.noreply.github.com>2017-06-19 05:57:35 (GMT)
commita4ec7fa7b7863e870d3b2ea8d2173083ae95ee95 (patch)
tree51336b15f47aae7c4d692df7fa088a734bb32d55
parent89b9f026c913c0d3e9995f52b49b37f1de1af150 (diff)
downloadlz4-a4ec7fa7b7863e870d3b2ea8d2173083ae95ee95.zip
lz4-a4ec7fa7b7863e870d3b2ea8d2173083ae95ee95.tar.gz
lz4-a4ec7fa7b7863e870d3b2ea8d2173083ae95ee95.tar.bz2
Fix gcc7 Wimplicit-fallthrough warnings
For the default Wimplicit-fallthrough=3 level, the comment should start with "fall*"
-rw-r--r--lib/lz4frame.c6
-rw-r--r--lib/lz4hc.c2
-rw-r--r--programs/lz4cli.c3
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;