I personally think "(void)flash;" looks really ugly
It really does.
Though, I try not to judge it by asthetics but the potential
benefit of the warning. Does anybody recall or imagine bugs
that would be prevented by -Wunused-parameter?
In cases where the parameter can't be removed, adding the (void) cast is at least useful documentation since it signifies the author recognized this and didn't make a mistake by not using it.
Or maybe hide the ugliness behind a macro...
(please don't shoot me for suggesting that)
I think C2X will allow omitting the name of a parameter and just stating the type (which is currently allowed in C++ and silences this warning), so even though it's ugly now there may be less ugly options in the future.
To view, visit change 30410. To unsubscribe, or for help writing mail filters, visit settings.