diff options
author | Rhett Aultman <roadriverrail@gmail.com> | 2017-04-14 22:48:59 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2017-05-03 17:26:21 +0800 |
commit | a40c8cfb68f75c22c0082714d99e9c3a24a31051 (patch) | |
tree | 4bf4be5f3a42924fbd91cda02906ad3ef201be3e /std/StandardToken.sol | |
parent | c09f071ff693f52a2a1434cfd6963b2d1818776e (diff) | |
download | dexon-solidity-a40c8cfb68f75c22c0082714d99e9c3a24a31051.tar.gz dexon-solidity-a40c8cfb68f75c22c0082714d99e9c3a24a31051.tar.zst dexon-solidity-a40c8cfb68f75c22c0082714d99e9c3a24a31051.zip |
Warn on unused local variables
Analyze functions for all local variables, parameters, and named
return variables which are never used in the function, and issue
a warning.
Diffstat (limited to 'std/StandardToken.sol')
-rw-r--r-- | std/StandardToken.sol | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/std/StandardToken.sol b/std/StandardToken.sol index 4dad8541..e5f7e577 100644 --- a/std/StandardToken.sol +++ b/std/StandardToken.sol @@ -22,10 +22,10 @@ contract StandardToken is Token { } function transfer(address _to, uint256 _value) returns (bool success) { - return doTransfer(msg.sender, _to, _value); + success = doTransfer(msg.sender, _to, _value); } - function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { + function transferFrom(address _from, address _to, uint256 _value) returns (bool) { if (m_allowance[_from][msg.sender] >= _value) { if (doTransfer(_from, _to, _value)) { m_allowance[_from][msg.sender] -= _value; @@ -36,7 +36,7 @@ contract StandardToken is Token { } } - function doTransfer(address _from, address _to, uint _value) internal returns (bool success) { + function doTransfer(address _from, address _to, uint _value) internal returns (bool) { if (balance[_from] >= _value && balance[_to] + _value >= balance[_to]) { balance[_from] -= _value; balance[_to] += _value; @@ -47,13 +47,13 @@ contract StandardToken is Token { } } - function approve(address _spender, uint256 _value) returns (bool success) { + function approve(address _spender, uint256 _value) returns (bool) { m_allowance[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } - function allowance(address _owner, address _spender) constant returns (uint256 remaining) { + function allowance(address _owner, address _spender) constant returns (uint256) { return m_allowance[_owner][_spender]; } } |