# Emit warning when value and/or gas is set but function does not perform the call

**URL:** <https://forum.soliditylang.org/t/emit-warning-when-value-and-or-gas-is-set-but-function-does-not-perform-the-call/2553>\
**Category:** Feedback\
**Created:** [August 7, 2024, 9:15pm UTC](https://forum.soliditylang.org/t/emit-warning-when-value-and-or-gas-is-set-but-function-does-not-perform-the-call/2553 "2024-08-07T21:15:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![htadashi](https://sea1.discourse-cdn.com/flex001/user_avatar/forum.soliditylang.org/htadashi/32/719_2.png) [@htadashi](https://forum.soliditylang.org/u/htadashi)\
**Post date:** [August 7, 2024, 9:15pm UTC](https://forum.soliditylang.org/t/emit-warning-when-value-and-or-gas-is-set-but-function-does-not-perform-the-call/2553/1 "2024-08-07T21:15:00Z")

</div>

The Solidity documentation [warns](https://docs.soliditylang.org/en/v0.8.26/control-structures.html#external-function-calls:~:text=not%20be%20available.-,Warning,-Be%20careful%20that) about using the syntax `feed.info{value: 10, gas: 800}`, which only sets the `value` and amount of `gas` for the function call locally, but does not actually perform the call.

This can be misleading for beginners and could potentially be exploited in underhanded code, such as:

```auto
// Misleading function that appears to perform a refund to a smart contract
function refund(address payable recipient, uint256 amount) public payable {
    ...
    // This sets the value but does not perform the call
    recipient.call{value: refund_value};
    ...
}

```

Shouldn’t Solidity emit a warning when there are functions written in this way?
