http://bugzilla.spamassassin.org/show_bug.cgi?id=3452





------- Additional Comments From [EMAIL PROTECTED]  2004-05-31 19:00 -------
Subject: Re:  compiler warnings in VC++ (Windows) spamc build

> What's left though, I'm not sure about. There's a library #include that
> generates a warning (thank you, Microsoft!). Maybe I should find the
compiler
> option to exclude that warning. And then there are a number of warnings
that a
> formal parameter (argument to a function) is never used in the body of the
function.
>
> What's the C idiom for saying to not generate a warning for an unused
variable?
> My brain is too full of languages at the moment to remember. In Lisp it is
> (declare (ignore variablename)). Do I have to set the switch to suppress
this
> warning?

If you have the right header file included (some subfile included in
windows.h, I don't recall what, you can use

        UNREFERENCED_PARAMETER (foo);

C/C++ has no specific syntax for "unreferenced variable" or "unreferenced
parameter".  Often you can do something like "if (var);", but that can
generate a warning in itself. "var = var;" is another possibility, as is
simply "var;".  All of these might end up generating warnings of their own
however.

A MS-specific choice is to disable the warning:

        #pragma warning (<number>:disable)

Where <number> is the warning number in question.  If the message says
"C2053: blah", the warning number is 2053, NOT C2053.

        Loren






------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Reply via email to