Skip to content

Commit a6ca76c

Browse files
committed
Avoid -Wmaybe-uninitialized when compiling with gcc -O1
1 parent 0fa84f8 commit a6ca76c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ecmult_impl.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,9 @@ static void secp256k1_ecmult_strauss_wnaf(const struct secp256k1_strauss_state *
288288
}
289289

290290
/* Bring them to the same Z denominator. */
291-
secp256k1_ge_table_set_globalz(ECMULT_TABLE_SIZE(WINDOW_A) * no, state->pre_a, state->aux);
291+
if (no) {
292+
secp256k1_ge_table_set_globalz(ECMULT_TABLE_SIZE(WINDOW_A) * no, state->pre_a, state->aux);
293+
}
292294

293295
for (np = 0; np < no; ++np) {
294296
for (i = 0; i < ECMULT_TABLE_SIZE(WINDOW_A); i++) {

0 commit comments

Comments
 (0)