ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

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

From: Jeff Morriss <jeff.morriss@xxxxxxxxxxx>
Date: Mon, 12 Feb 2007 22:13:56 +0800


Gerhard Gappmeier wrote:
I see. This works a little bit different than I expected.
  void method(int _U_)
  {
  }
just becomes
  void method(int )
  {
  }
I'm not sure if every compiler accepts that or also outputs a warning if the parameter name is missing.

In fact it should be used like:

void method(int foo _U_)

which should become

void method(int foo __attribute__((unused)))

I'm not sure if _U_ is implemented for anything other than GCC, though. What compiler are you using?