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 02:42:33 -0800
LEGO wrote:
[snip]... he's using GCC while you aren't.  (If you *are* using GCC,
I have no idea why the code in question compiled....)


[id-est:~] lego% cc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/3.3/specs
Thread model: posix
gcc version 3.3 20030304 (Apple Computer, Inc. build 1495)

I'm using gcc.

Well, perhaps some versions of GCC don't like that; apparently the Apple version in question does. (Maybe this is a GCC 4.0 change, or maybe older versions of GCC didn't support it.)

John, what happens if you try compiling the small attached program? Does the compiler report an error? And, if you're using GCC, what does "gcc --version" print?
int foo(int, int __attribute__((unused)));

int
foo(int a, int b __attribute__((unused)))
{
	return a + 17;
}

int
main(int argc, char **argv)
{
	return foo(argc, argv[0][0]);
}