Skip to content

refactor: clear unused-parameter warnings outside the models (#161) - #230

Merged
antonio-leblanc merged 1 commit into
forefireAPI:devfrom
HugoFara:refactor/unused-parameters
Oct 29, 2026
Merged

antonio-leblanc merged 1 commit into
forefireAPI:devfrom
HugoFara:refactor/unused-parameters

Conversation

@HugoFara

Copy link
Copy Markdown
Collaborator

Second step of #161, after #227: unused parameters outside flux/ and propagation/.

  • Names a function never reads are commented out (const double& /*t*/), mostly in the layer headers.
  • Command::writeNetCDF reads its parameters only with NetCDF, so they are [[maybe_unused]] instead.

GCC -Wall -Wextra: 271 → 21 unique warnings (20 in the models, plus listenMode in listenHTTP). 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.

…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 antonio-leblanc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

@antonio-leblanc

Copy link
Copy Markdown
Collaborator

Filippi, I'll merge this one since there's no physics involved (only parameter names commented out, no behavior change).

@antonio-leblanc
antonio-leblanc merged commit 0a52ee8 into forefireAPI:dev Oct 29, 2026
6 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