Page MenuHomePhabricator

[secp256k1] initialize variable in tests

Authored by PiRK on Thu, Apr 8, 06:44.


Group Reviewers
Restricted Project
rABCb0d8c607a6ca: [secp256k1] initialize variable in tests

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

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

Diff Detail

rABC Bitcoin ABC
Lint Not Applicable
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Thu, Apr 8, 06:44
PiRK retitled this revision from initialize variable in tests to [secp256k1] initialize variable in tests.Thu, Apr 8, 06:44
Fabien edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Thu, Apr 8, 06:55
This revision was automatically updated to reflect the committed changes.