Ethereal-dev: Re: [Ethereal-dev] What is the purpose of the preprocessor constant _U_ in the

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: Thu, 16 Sep 2004 15:45:29 -0700 (PDT)
It's used to mark unused function arguments in cases where those arguments
*have* to be present (e.g., because a pointer to the function is being
passed to a routine that expects a function with a given signature), so
that compiler warnings about the argument are suppressed.  (If the
argument doesn't have to be there, it should be removed - but perhaps the
bug is that it *should* be used but isn't being used.)

For GCC, it's defined to be a string that tells GCC not to warn that the
argument is unused; for other compilers, it's defined as an empty string.

jscott said:
> I'm trying to compile the  Ethereal source under WinXP, and there are
> compile errors caused by the _U_ preprocessor constant.  In the project
> settings it's defined to be "", an empty string.  This causes a compile
> error," Newline in constant."

There's no newline in ""; perhaps the compiler is confused?

Note that if by "project" in "project settings" you mean some project file
for Visual Studio or whatever, we don't supply those files, we just supply
a Makefile for nmake - and that definitely works with a command-line
build.  If you're trying to make a Visual Studio project that's not just a
"Makefile project", you'll have to figure it out yourself or hope that
somebody else has figured it out.