Auto merge of #3205 - str4d:3173-missing-return, r=str4d

Return result of boost::apply_visitor

Not returning a value at the end of a non-void function is undefined behaviour.
Given that this managed to pass our full test suite, I guess that GCC looks for
un-returned values at the end of a function and uses them as the return value,
if the keyword is missing. Clang OTOH complains, which is how we spotted this:
https://ci.z.cash/#/builders/16/builds/282
This commit is contained in:
Homu 2018-04-25 13:50:53 -07:00
commit c6ab62191a
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ bool JSDescription::Verify(
const uint256& pubKeyHash
) const {
auto pv = SproutProofVerifier(params, verifier, pubKeyHash, *this);
boost::apply_visitor(pv, proof);
return boost::apply_visitor(pv, proof);
}
uint256 JSDescription::h_sig(ZCJoinSplit& params, const uint256& pubKeyHash) const