Catching the mismatch
Catching the mismatch
Posted Feb 11, 2025 12:22 UTC (Tue) by TomH (subscriber, #56149)In reply to: Catching the mismatch by farnz
Parent article: Maintainer opinions on Rust-for-Linux
In C that's only technically allowed from C23 on but gcc won't complain unless -pedantic is used, though clang will.
Posted Feb 11, 2025 12:43 UTC (Tue)
by farnz (subscriber, #17727)
[Link] (1 responses)
And yes, I can (and have) worked around this with documentation comments, but those have a bad habit of getting stale, such that the doc comment refers to a parameter called "ignored_cpu_mask" that's been removed and replaced by a "active_cpu_mask"…
Posted Feb 11, 2025 17:35 UTC (Tue)
by mathstuf (subscriber, #69389)
[Link]
See this Rust issue as well for when `_arg` naming is unwelcome: https://github.com/rust-lang/rust/issues/91074
The comment trick q3cpma points out would work, but I'd normally want to have a name in there because of the partially applied patch series problem, where I want people to be aware that this parameter does have a meaning.
Catching the mismatch
Catching the mismatch