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.

View Change

To view, visit change 30410. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If831398c91e9f49bd5216a03ed4caaa2a7ab02bd
Gerrit-Change-Number: 30410
Gerrit-PatchSet: 5
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec@chromium.org>
Gerrit-Reviewer: Jacob Garber <jgarber1@ualberta.ca>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Richard Hughes <richard@hughsie.com>
Gerrit-Reviewer: Stefan T <stefan.tauner@gmx.at>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Comment-Date: Tue, 06 Aug 2019 19:33:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment