crytic / crytic/slither

Invalid detection of local variable never intialized

Open
#959 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
6.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

```
$ slither --version
0.8.0
```

Please consider [the following code](https://github.com/threshold-network/solidity-contracts/blob/913c04debc1b5a733ea402bf5dacd5e85da0db8a/contracts/governance/Checkpoints.sol#L129):
```
(uint256 oldWeight, uint256 newWeight) = writeCheckpoint(...)
```

```
function writeCheckpoint(...) internal returns (uint256 oldWeight, uint256 newWeight) {
...
}
```

Slither says:
> Checkpoints.moveVotingPower(address,address,uint256).newWeight_scope_1 (contracts/governance/Checkpoints.sol#129) is a local variable never initialized
Checkpoints.moveVotingPower(address,address,uint256).oldWeight_scope_0 (contracts/governance/Checkpoints.sol#129) is a local variable never initialized

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.