From 59b9b03ffd6825ae047ea2e8e5863bdc87d3934f Mon Sep 17 00:00:00 2001 From: Peter Pentchev Date: Sun, 22 Aug 2021 14:51:49 +0300 Subject: [PATCH] Only declare a variable if it will be used. Spotted by: cppcheck --- src/lib/comp/zstd/zstd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/comp/zstd/zstd.c b/src/lib/comp/zstd/zstd.c index 628edc7..921426f 100644 --- a/src/lib/comp/zstd/zstd.c +++ b/src/lib/comp/zstd/zstd.c @@ -37,7 +37,9 @@ static bool init(zckCtx *zck, zckComp *comp) { VALIDATE_BOOL(zck); ALLOCD_BOOL(zck, comp); +#ifndef OLD_ZSTD size_t retval = 0; +#endif comp->cctx = ZSTD_createCCtx(); #ifndef OLD_ZSTD -- 2.30.2