Skip to content

Commit

Permalink
Fix unnamed return variable warning
Browse files Browse the repository at this point in the history
This commit fixes warnings thrown by the solc 0.7.4 compiler:
"Warning: Unnamed return variable can remain unassigned. Add an explicit
return with value to all non-reverting code paths or name the variable."
  • Loading branch information
zemse committed Oct 24, 2020
1 parent e271e42 commit f0bbdeb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions contracts/GSN/GSNRecipientERC20Fee.sol
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ contract GSNRecipientERC20Fee is GSNRecipient {

// The maximum token charge is pre-charged from the user
_token.safeTransferFrom(from, address(this), maxPossibleCharge);

return 0;
}

/**
Expand Down
8 changes: 4 additions & 4 deletions contracts/proxy/TransparentUpgradeableProxy.sol
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ contract TransparentUpgradeableProxy is UpgradeableProxy {
* https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
*/
function admin() external ifAdmin returns (address) {
return _admin();
function admin() external ifAdmin returns (address admin_) {
admin_ = _admin();
}

/**
Expand All @@ -80,8 +80,8 @@ contract TransparentUpgradeableProxy is UpgradeableProxy {
* https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`
*/
function implementation() external ifAdmin returns (address) {
return _implementation();
function implementation() external ifAdmin returns (address implementation_) {
implementation_ = _implementation();
}

/**
Expand Down

0 comments on commit f0bbdeb

Please sign in to comment.