mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #1778 from ethereum/warnsendtransfer
Mention 'transfer' in warning about unchecked 'send'.
This commit is contained in:
commit
6258fe7185
@ -891,10 +891,11 @@ void TypeChecker::endVisit(ExpressionStatement const& _statement)
|
|||||||
if (
|
if (
|
||||||
location == Location::Bare ||
|
location == Location::Bare ||
|
||||||
location == Location::BareCallCode ||
|
location == Location::BareCallCode ||
|
||||||
location == Location::BareDelegateCall ||
|
location == Location::BareDelegateCall
|
||||||
location == Location::Send
|
|
||||||
)
|
)
|
||||||
warning(_statement.location(), "Return value of low-level calls not used.");
|
warning(_statement.location(), "Return value of low-level calls not used.");
|
||||||
|
else if (location == Location::Send)
|
||||||
|
warning(_statement.location(), "Failure condition of 'send' ignored. Consider using 'transfer' instead.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4420,7 +4420,7 @@ BOOST_AUTO_TEST_CASE(unused_return_value_send)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
CHECK_WARNING(text, "Return value of low-level calls not used");
|
CHECK_WARNING(text, "Failure condition of 'send' ignored. Consider using 'transfer' instead.");
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(unused_return_value_call)
|
BOOST_AUTO_TEST_CASE(unused_return_value_call)
|
||||||
|
Loading…
Reference in New Issue
Block a user