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 clang warning "private field '...' is not used" #3280

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

BsAtHome
Copy link
Contributor

There are several cases in the hal/user_comps/xhc-whb04b-6 pendent code where private member variables are completely unused or initialized and then never used. They generate a warning in clang.

This PR comments out unused private class members where never addressed. The private class members initialized but unused afterwards are declared (void) in the respective constructor.

The other option would be to delete those members completely. However, I cannot tell whether that would have other side effects and is therefore not the path chosen.

Comment out unused private class members where never addressed.
Declare unused private class members (void) in constructor when only initialized.
@andypugh andypugh merged commit 6b242af into LinuxCNC:master Jan 15, 2025
10 checks passed
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

Successfully merging this pull request may close these issues.

2 participants