[Bf-committers] Re: Solution for suppressing "unused parameter"warnings?

Joe Eagar joeedh at gmail.com
Wed May 31 00:41:08 CEST 2006


Gilbert, Joseph T. wrote:
> MSVC doesn't generate the same compiler warnings. The projectfiles still generate a TON of warnings but they're not the same things that gcc puts out. The unused 'self' variable warning doesn't show up in the VC compiler. (at least not at it's current warnings lvl). Adding code like UNUSED(x) would be extremely strange imho since windows doesn't even generate this warning. 
>
> The only reliable way on the vc compiler versions is to suppress warnings is by inserting the #pragma <warning> code into the files that are throwing warnings. In theory you can insert warning suppresion into the projectfiles, but this seems to be buggy on some versions. 
>   
Mingw gcc will throw all kinds of "Warning: deprecated use of #pragma" 
warnings if you use pragma.  I think finding and implementing the 
necessary compiler flags for gcc and msvc (and perhaps the irix compiler 
if that's still supported) would be the best thing to do.

Joe


More information about the Bf-committers mailing list