Comments (6)
Slither recommends local variables to always be explicitly initialized. We usually treat this as a false positve
from sifnode.
@ElliotFriedman and @stbeyer do you believe this to be a false positive in this instance?
from sifnode.
yes, it's a false positive, because it is assigned in 2 out of 3 branches in the code and the third one reverts.
Slither is opinionated here in that it recommends always initializing this type of variable to 0 explicitly, instead of relying on the default values (which is address(0)).
I personally don't agree with this, since default values are clearly defined for all variable types in Solidity.
from sifnode.
I personally don't agree with this, since default values are clearly defined for all variable types in Solidity.
Based on this, I'll exclude uninitialized-local
detector warnings in the slither config file. That will prevent this warning appearing in the future.
from sifnode.
from sifnode.
This has been fixed in Slither config.
from sifnode.
Related Issues (20)
- HAL-02 vulnerable 3rd party packages HOT 2
- HAL-03 lack of validation on setblacklist message HOT 2
- HAL-04 sensitive information in environment variables HOT 2
- HAL-05 lack of validation of ethereum address formats HOT 7
- HAL-06 iteration over map source of non-determinism HOT 10
- HAL-07 downcasting of 64-bit integer HOT 4
- HAL-09 hardcoded mnemonic phrases in the repository HOT 1
- HAL-10 use of outdated solidity version HOT 4
- HAL-12 open todos HOT 2
- HAL-14 unused variables HOT 2
- HAL-13 panic is used for error handling HOT 3
- Add peggy2 test case for a token that does a reentrant lock/burn
- Peggy2 protobuf files need to be compatible with peggy1 HOT 2
- saw in the validator logs `module=x/ibc/channel sequence="marshaling error: json: unsupported type: func() uint64"`
- Add missing integration test to github action
- Enhance Non-Rowan Yield Reward Functionality with Optional Duration Feature HOT 3
- Enhance Non-Rowan Yield Reward Functionality with Optional Duration Feature
- Enhance Non-Rowan Yield Reward Functionality with Optional Duration Feature HOT 1
- Enhance Non-Rowan Yield Reward Functionality with Optional Duration Feature HOT 2
- Enhance Non-Rowan Yield Reward Functionality with Optional Duration Feature HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sifnode.