From 1c1fa5d968b3727b79f0b68dc3c2e94e2f05c992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Venturo?= Date: Wed, 7 Aug 2019 21:35:04 -0300 Subject: [PATCH] Silence false positive warning on preValidatePurchase (#1857) --- contracts/crowdsale/Crowdsale.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/crowdsale/Crowdsale.sol b/contracts/crowdsale/Crowdsale.sol index 824ba83cf..03fda95a5 100644 --- a/contracts/crowdsale/Crowdsale.sol +++ b/contracts/crowdsale/Crowdsale.sol @@ -138,6 +138,7 @@ contract Crowdsale is ReentrancyGuard { function _preValidatePurchase(address beneficiary, uint256 weiAmount) internal view { require(beneficiary != address(0), "Crowdsale: beneficiary is the zero address"); require(weiAmount != 0, "Crowdsale: weiAmount is 0"); + this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 } /**