Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler warnings. #90

Open
MicahZoltu opened this issue Nov 4, 2019 · 1 comment
Open

Fix compiler warnings. #90

MicahZoltu opened this issue Nov 4, 2019 · 1 comment

Comments

@MicahZoltu
Copy link

dss/src/vat.sol

Lines 93 to 97 in 17be7db

function add(uint x, int y) internal pure returns (uint z) {
z = x + uint(y);
require(y >= 0 || z <= x);
require(y <= 0 || z >= x);
}

dss/src/vat.sol

Lines 108 to 110 in 17be7db

function add(uint x, uint y) internal pure returns (uint z) {
require((z = x + y) >= x);
}

vat.sol:93:5: Warning: Variable is shadowed in inline assembly by an instruction of the same name
    function add(uint x, int y) internal pure returns (uint z) {
    ^ (Relevant source part starts here and spans across multiple lines).
@MicahZoltu
Copy link
Author

Repro case:

pragma solidity 0.5.12;

contract MyContract {
    function add() external pure {
        assembly { }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant