Re: Re: [Tidy-cvs] tidy/src streamio.c,1.27,1.28
Charlie <[email protected]>
| Newsgroups | gmane.comp.web.html-tidy.devel |
|---|---|
| Message-ID | <[email protected]> |
The usual approach is a macro (for compiler not supporting the unused pragma):
#define UNUSED( v ) v = v
int foo( int bar )
{
UNUSED(bar);
return 3;
}
This prevents the compiler warning about the unused parameter.
I'm doing this from memory. The following might also work:
#define UNUSED(v) v
At 06:05 PM 3/3/2005 +0100, Bjoern Hoehrmann wrote:
>* Arnaud Desitter wrote:
> >"#pragma unused(xxx)" which causes flood of warnings with gcc.
> >Granted, I can filter them out but what a pain.
>
>Terry added them (applying a third-party patch, iirc) to actually remove
>compiler warnings. MSVC++ does not support such a pragma so I've then
>added a pragma to disable warnings for `#pragma unused(xxx)`. Sounds like
>we should remove them?
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click