Compiler warning in the OZ contract `ERC20PermitUpgradeable`

The following function from OZ's upgradable contracts will generate a warning:

Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
  --> @openzeppelin/contracts-upgradeable/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:41:43:
   |
41 |     function __ERC20Permit_init_unchained(string memory name) internal initializer {
   |                                           ^^^^^^^^^^^^^^^^^^

I use the Hardhat environment with TypeScript and tried the Solidity compiler versions 0.8.2, 0.8.4, and 0.8.9 all throwing all the same warning.

What I find is really strange is that the draft-EIP712Upgradeable contract has a similar pattern but does not throw a warning here: openzeppelin-contracts-upgradeable/draft-EIP712Upgradeable.sol at master · OpenZeppelin/openzeppelin-contracts-upgradeable (github.com)

1 Like

Thanks - I assume you still plan to implement this feature in your OpenZeppelin tool?

Yes it has taken a while but it will be fixed.

1 Like