From: Peter Pentchev Date: Sun, 22 Aug 2021 11:51:49 +0000 (+0300) Subject: Only declare a variable if it will be used. X-Git-Tag: archive/raspbian/1.2.1+ds1-1+rpi1^2~7^2~1^2~23^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=59b9b03ffd6825ae047ea2e8e5863bdc87d3934f;p=zchunk.git Only declare a variable if it will be used. Spotted by: cppcheck --- 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