Re:Useful GCC warning options not enabled by -Wall -Wextra
by Asooka on Thursday October 05, 2017 @05:25AM
(#15407746)
For -Wunused specifically, the correct idiom is "(void)x;". It's a no-op that marks x as having been used. Yes, in an ideal world you wouldn't have to do that, but sometimes you're overriding a virtual method and genuinely don't need to use one of the parameters.
[ Parent
| on HN ]
There are no comments on this comment yet.