-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Use standard C++ timer for long timeouts (#1327), remove unused code #1328
Conversation
SonarCloud Quality Gate failed. 0 Bugs 0.0% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was it Sonar that made you aware of the bitrotted code?
@@ -68,8 +68,7 @@ class BUS : public PinControl | |||
// Operation modes definition | |||
enum class mode_e { | |||
TARGET = 0, | |||
INITIATOR = 1, | |||
MONITOR = 2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not used by scsimon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is not. Otherwise it would already break when compiling. You know how much I like to repeat that there is a lot of unused code ;-).
No, I stumble upon this when reviewing and cleaning up the existing code. Only recently I also started with that for the code in hal. Often, as soon as you remove an unused method, for instance, another unused method or field pops up, which before was only used by the unused code you have just removed. And so on ... |
Have you tried using |
I have never heard of cppcheck. Sounds like it is something I should try. |
…1328) * Replace timer in WaitSignal() ' Remove unused code * Remove unused file
…1328) * Replace timer in WaitSignal() ' Remove unused code * Remove unused file
…1328) * Replace timer in WaitSignal() ' Remove unused code * Remove unused file
Just tried gcccheck. It takes less than 4 seconds on my PC. And indeed it found unused code and redundant assignments and a redundant condition. Not that many code locations, but SonarCloud did not find them. |
…1328) * Replace timer in WaitSignal() ' Remove unused code * Remove unused file
No description provided.