aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-03-15 18:10:24 +0800
committerchriseth <c@ethdev.com>2017-03-15 18:10:24 +0800
commitab178b8bac600562b9dadc529846a263efc14463 (patch)
tree7ba8caccde57c938485038d48e9e4235080e6ece /libsolidity
parentd134fda0c05640992941087139316d2b8fb3f816 (diff)
downloaddexon-solidity-ab178b8bac600562b9dadc529846a263efc14463.tar
dexon-solidity-ab178b8bac600562b9dadc529846a263efc14463.tar.gz
dexon-solidity-ab178b8bac600562b9dadc529846a263efc14463.tar.bz2
dexon-solidity-ab178b8bac600562b9dadc529846a263efc14463.tar.lz
dexon-solidity-ab178b8bac600562b9dadc529846a263efc14463.tar.xz
dexon-solidity-ab178b8bac600562b9dadc529846a263efc14463.tar.zst
dexon-solidity-ab178b8bac600562b9dadc529846a263efc14463.zip
Mention 'transfer' in warning about unchecked 'send'.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/analysis/TypeChecker.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index 8e7ec29b..512493cd 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -891,10 +891,11 @@ void TypeChecker::endVisit(ExpressionStatement const& _statement)
if (
location == Location::Bare ||
location == Location::BareCallCode ||
- location == Location::BareDelegateCall ||
- location == Location::Send
+ location == Location::BareDelegateCall
)
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.");
}
}
}