Skip to content

Chore: Fix unused variable warnings#165

Merged
brenocq merged 3 commits into
brenocq:mainfrom
HunterBelanger:fix/unused_warnings
Feb 12, 2026
Merged

Chore: Fix unused variable warnings#165
brenocq merged 3 commits into
brenocq:mainfrom
HunterBelanger:fix/unused_warnings

Conversation

@HunterBelanger

Copy link
Copy Markdown
Contributor

I found a few places in the code where function arguments were not being used, and gcc/clang was giving warnings regarding unused variables. I have commented out the variable names here to silence these warnings. I don't think these are bugs, but I definitely don't know enough about the project to be sure, so you should definitely check to see if this is really the case.

@github-actions github-actions Bot added the status:review The task is under review label Jan 28, 2026
@brmarkus

Copy link
Copy Markdown

What about using [[maybe_unused]] (from C++11)?
See https://en.cppreference.com/w/cpp/language/attributes.html for details.

@HunterBelanger

Copy link
Copy Markdown
Contributor Author

The [[maybe_unused]] attribute actually requires C++17 or greater, which I think probably exceeds the projects targeted standard?

@brmarkus

Copy link
Copy Markdown

The [[maybe_unused]] attribute actually requires C++17 or greater, which I think probably exceeds the projects targeted standard?

Yeah, you are right: https://en.cppreference.com/w/cpp/language/attributes/maybe_unused.html
Even "CONTRIBUTING.md" mentions

Only use C++ features available in C++11.

Sorry for the confusion.

@brenocq brenocq left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sharing this warning @HunterBelanger! I've removed the unused arguments and added the flag -Wextra to the workflows to make sure these warnings are caught.

@brenocq brenocq merged commit 922ac97 into brenocq:main Feb 12, 2026
4 checks passed
@github-actions github-actions Bot removed the status:review The task is under review label Feb 12, 2026
@brenocq brenocq added prio:low Low priority type:chore Maintenance tasks (dependencies, configs) status:done Task completed successfully labels Feb 12, 2026
@brenocq brenocq added this to the v0.4 milestone Feb 12, 2026
@brenocq brenocq self-assigned this Feb 12, 2026
@brenocq brenocq changed the title Fixed Unused Variable Warnings Chore: Fix unused variable warnings Feb 12, 2026
@HunterBelanger HunterBelanger deleted the fix/unused_warnings branch February 22, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

prio:low Low priority status:done Task completed successfully type:chore Maintenance tasks (dependencies, configs)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants