-
-
Notifications
You must be signed in to change notification settings - Fork 686
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
STYLE: Variable set but not used suppression #4978
STYLE: Variable set but not used suppression #4978
Conversation
double chebycoefs0 = 0.0; // the constant term | ||
double datatotal = 0.0; | ||
double a0norm = 1.0; | ||
// NOT USED double chebycoefs0 = 0.0; // the constant term | ||
// NOT USED double datatotal = 0.0; | ||
// NOT USED double a0norm = 1.0; |
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.
If those variables are really useless, please consider simply removing those lines of code, instead of just commenting them out. 🙏
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.
I agree. Restoring the variables is easy with versioned history, if it is ever needed.
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.
Removing the comment-out code might actually please the spell checker at the CI, which specifically checks comments! It now complains, saying:
itkFEMImageMetricLoad.hxx line: 580 word: datatotal
ITK/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.hxx:579:10: warning: variable 'chebycoefs0' set but not used [-Wunused-but-set-variable]
4e89b42
to
3e73585
Compare
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.
Thanks, Hans!
ITK/Modules/Numerics/FEM/include/itkFEMImageMetricLoad.hxx:579:10: warning: variable 'chebycoefs0' set but not used [-Wunused-but-set-variable]
PR Checklist