Ethereal-dev: Re: [Ethereal-dev] FYI - bug (with patch) for ethereal-0.10.9

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Fri, 28 Jan 2005 11:03:10 -0800
Benninghoff, John (RBC Dain) wrote:

The test.c program compiles fine on my system.

But the MATE code didn't? That's odd - the declaration of "foo()" used "__attribute__((unused))" in a function prototype that lacked parameter names, and that's the construct that was, apparently, the source of the problem in the MATE code.

I would guess that _U_ is a GCC3-ism?

_U_ is an Ethereal-ism (Joerg Mayer might have been the person who came up with it). __attribute__ is a GCC-ism, but it's not a GCC3-ism - it was in GCC 2.x as well.

_U_ is our way of supporting the ability to declare function arguments as unused in GCC without using a *LOT* of #ifdefs and without making it impossible to compile Ethereal with compilers that don't support "__attribute__". (Another alternative would be to define "__attribute__(x)" as nothing - I think that's why the GCC folk put the extra parentheses there, to let that trick work on compilers that don't support varargs macros - but _U_ is shorter than "__attribute__((unused))", so it also arguably clutters the code a bit less.