Skip to content

Commit b2c6ad7

Browse files
committed
Cleanse 'bits' variable such that it doesn't get optimized away.
Fixes clang static analysis issue: -------------------------------------------------------------------------------- An issue has been found in ./src/ecmult_gen_impl.h:150:5 Type: Dead assignment Description: Value stored to 'bits' is never read 0: ./src/ecmult_gen_impl.h:153:5 - Value stored to 'bits' is never read --------------------------------------------------------------------------------
1 parent 6877fb3 commit b2c6ad7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ecmult_gen_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static void secp256k1_ecmult_gen(const secp256k1_ecmult_gen_context *ctx, secp25
147147
secp256k1_ge_from_storage(&add, &adds);
148148
secp256k1_gej_add_ge(r, r, &add);
149149
}
150-
bits = 0;
150+
SECP256K1_CLEANSE(bits);
151151
SECP256K1_CLEANSE(add);
152152
SECP256K1_CLEANSE(gnb);
153153
}

0 commit comments

Comments
 (0)