Page MenuHomePhabricator

[secp256k1] initialize variable in tests
ClosedPublic

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

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCb0d8c607a6ca: [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

Event Timeline

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