Solidity – Return Value of Low-Level Calls Not Used

soliditytruffle

I'm attempting to use the function send() in Solidity
I've got this error when i try to compile my contract with truffle :

Warning: Return value of low-level calls not used.

any idea about it?

thank you

Best Answer

you could use a modifier :

modifier send_it(uint _amount, address _address ) {
    if (msg.value < _amount)
        throw;
    _
    if (msg.value > _amount)
        _address .send(_amount - msg.value);
}

  function x(address _newOwner)
        send_it(200 ether,msg.sender) //exemple
    {
     
     }

or you could just use simple checking (throw if send failed for some reason):

if (_address.send())
 throw;