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:
commit
c6ab62191a
|
@ -115,7 +115,7 @@ bool JSDescription::Verify(
|
||||||
const uint256& pubKeyHash
|
const uint256& pubKeyHash
|
||||||
) const {
|
) const {
|
||||||
auto pv = SproutProofVerifier(params, verifier, pubKeyHash, *this);
|
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
|
uint256 JSDescription::h_sig(ZCJoinSplit& params, const uint256& pubKeyHash) const
|
||||||
|
|
Loading…
Reference in New Issue