Repository navigation
refactor: clear unused-parameter warnings outside the models (#161) - #230
Merged
antonio-leblanc merged 1 commit intoOct 29, 2026
Merged
Conversation
…eAPI#161) Comment out the names of parameters a function never reads, mostly in the DataLayer headers whose virtual overrides ignore their arguments. Where the name is only read when NetCDF is compiled in (Command::writeNetCDF), mark it [[maybe_unused]] instead, so both builds stay quiet. GCC -Wall -Wextra: 271 -> 21 unique warnings. Clang also warns in templates GCC never instantiates; none of those unused parameters remain either. Left for later: flux/ and propagation/ (physics), listenMode in listenHTTP, and Clang's variable-length arrays.
antonio-leblanc
approved these changes
Oct 29, 2026
antonio-leblanc
left a comment
Collaborator
There was a problem hiding this comment.
Checked that restoring the names gives files identical to dev 👍 Unrelated, noticed while reading: writeASCII ignores NEY, so cellsize assumes square cells. Not for this PR.
Collaborator
|
Filippi, I'll merge this one since there's no physics involved (only parameter names commented out, no behavior change). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second step of #161, after #227: unused parameters outside
flux/andpropagation/.const double& /*t*/), mostly in the layer headers.Command::writeNetCDFreads its parameters only with NetCDF, so they are[[maybe_unused]]instead.GCC
-Wall -Wextra: 271 → 21 unique warnings (20 in the models, pluslistenModeinlistenHTTP). Clang's extra template warnings of this kind are gone too.Tested: builds with GCC, GCC without NetCDF, and Clang; ctest passes. Putting the names back gives files identical to
dev.Left for later: the models, and Clang's variable-length arrays, self-assignments (
FireDomain.cpp:3482) and&on booleans (Command.cpp:534).Drafted with Claude Opus 5.5.