ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Unused variables

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 12 Feb 2007 09:13:15 -0800
Gerhard Gappmeier wrote:
I see. This works a little bit different than I expected.
  void method(int _U_)
  {
  }
just becomes
  void method(int )
  {
  }

Why would you do that?

If "method" doesn't need to take a parameter, it should be

	void method(void)
	{
	}

and if it does, but doesn't use it, it should be

	void method(int dummy _U_)
	{
	}