[PATCH] chg: silence warning of unused parameter 'sig'
Yuya Nishihara
yuya at tcha.org
Wed Jun 29 08:28:20 EDT 2016
On Tue, 28 Jun 2016 21:21:50 +0100, Jun Wu wrote:
> Alternative to the GNU extension "__attribute__", there are 2 common
> patterns to silence the warning:
>
> void handlechildsignal(int /* sig */)
It's C++.
> or in the body of the function:
>
> (void)sig;
Yes, I sometimes do that if I want to suppress the warning conditionally.
More information about the Mercurial-devel
mailing list