summaryrefslogtreecommitdiffstats
path: root/lib/lz4frame.c
diff options
context:
space:
mode:
authorNick Terrell <terrelln@fb.com>2019-07-19 21:44:06 (GMT)
committerNick Terrell <terrelln@fb.com>2019-07-19 21:44:06 (GMT)
commit87e52f7d5d8e2e44c107ca266d91a5ff669325b1 (patch)
treef775333685f4d084862c707951405541bb9fccf9 /lib/lz4frame.c
parentee23c273e22aafb3e4d07f3429e59e4e31e6b37d (diff)
downloadlz4-87e52f7d5d8e2e44c107ca266d91a5ff669325b1.zip
lz4-87e52f7d5d8e2e44c107ca266d91a5ff669325b1.tar.gz
lz4-87e52f7d5d8e2e44c107ca266d91a5ff669325b1.tar.bz2
[lz4frame] Fix unused variable warnings in fuzzing mode
Diffstat (limited to 'lib/lz4frame.c')
-rw-r--r--lib/lz4frame.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/lz4frame.c b/lib/lz4frame.c
index 13c1ae9..c9f630d 100644
--- a/lib/lz4frame.c
+++ b/lib/lz4frame.c
@@ -1564,6 +1564,9 @@ size_t LZ4F_decompress(LZ4F_dctx* dctx,
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
if (readCRC != calcCRC)
return err0r(LZ4F_ERROR_blockChecksum_invalid);
+#else
+ (void)readCRC;
+ (void)calcCRC;
#endif
} }
dctx->dStage = dstage_getBlockHeader; /* new block */
@@ -1606,6 +1609,9 @@ size_t LZ4F_decompress(LZ4F_dctx* dctx,
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
if (readBlockCrc != calcBlockCrc)
return err0r(LZ4F_ERROR_blockChecksum_invalid);
+#else
+ (void)readBlockCrc;
+ (void)calcBlockCrc;
#endif
} }
@@ -1737,6 +1743,9 @@ size_t LZ4F_decompress(LZ4F_dctx* dctx,
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
if (readCRC != resultCRC)
return err0r(LZ4F_ERROR_contentChecksum_invalid);
+#else
+ (void)readCRC;
+ (void)resultCRC;
#endif
nextSrcSizeHint = 0;
LZ4F_resetDecompressionContext(dctx);