From: Sergei Ianovich Date: Tue, 30 Jul 2024 15:04:04 +0000 (+0000) Subject: Fix double initialization X-Git-Url: http://www.wagner.pp.ru/gitweb/?a=commitdiff_plain;h=d5242a8225228d102a38ec46697519724e0a094f;p=openssl-gost%2Fengine.git Fix double initialization Infer correctly complains that `ptr` is initialized twice before first use. The fix is trivial. ``` gost12sum.c:253: error: Dead Store The value written to `&ptr` is never used. 251. { 252. int i, len; 253. char *ptr = filename; ^ 254. char *spacepos = NULL; 255. ``` --- diff --git a/gost12sum.c b/gost12sum.c index e644a61..7e443d3 100644 --- a/gost12sum.c +++ b/gost12sum.c @@ -250,7 +250,7 @@ int hash_stream(gost_hash_ctx * ctx, int fd, char *sum, int hashsize) int get_line(FILE *f, char *hash, char *filename, int verbose, int *size) { int i, len; - char *ptr = filename; + char *ptr; char *spacepos = NULL; while (!feof(f)) {