HomePhabricator

[secp256k1] initialize variable in tests

Description

[secp256k1] initialize variable in tests

Summary:

This was detected while running the tests with the -Wconditional-uninitialized flag

./autogen.sh
CC=clang CFLAGS="-Wconditional-uninitialized" ./configure
make check

The resulting warning is a false positive, but setting the value to -1
ensures that the CHECK below will fail if recid is never written to.

This is a backport of secp256k1#889

It should allow us to finally land D9110

Test Plan:
To check that this diff does not break existing tests:
ninja && ninja check-secp256k1

To check that this removes the compilation warning: rebased D9110 on top of this

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D9372

Details

Provenance
PiRKAuthored on Jan 29 2021, 10:49
PiRKPushed on Thu, Apr 8, 08:28
Reviewer
Restricted Project
Differential Revision
D9372: [secp256k1] initialize variable in tests
Parents
rABCda7fa24db627: [Automated] Update timing.json
Branches
Unknown
Tags
Unknown