RE:[GD-General] C++ analyzers?
Brought to you by:
vexxed72
From: Jeff L. <je...@SP...> - 2002-07-21 22:46:27
|
> Message: 9 > From: "Dirk Ringe" <ri...@ph...> > To: <gam...@li...> > Subject: RE: [GD-General] C++ analyzers? > Date: Fri, 19 Jul 2002 09:46:16 +0200 > > We just wrote an include file to pull the relevant level 4 > warnings up to > level 3. It is force included throughout the project: Ye gods, why bother with level 4 at all? Our projects use /W4 with this: #if defined(_WIN32) /* * warnings we turn off are: * 4054 type cast from function pointer to data pointer void * * 4055 type cast from data pointer void * to function pointer * 4097 typedef-name used as synonym for class-name * 4115 named type definition in parentheses (in MS header rpcasynch.h) * 4127 conditional expression is constant * 4204 non-constant aggregate initialiser * 4511 copy constructor could not be generated (a few) * 4512 assignment operator could not be generated (a few) * 4514 unreferenced inline function has been removed (hundreds in C++ headers) * 4615 unknown user warning number (bogus warnings) */ #pragma warning( disable : 4054 4055 4097 4115 4127 4511 4512 4514 4615 4204 ) #endif and we find that that traps any unsavoury practices that we need. Allowing 4127 is perhaps a bit generous but we have an debug mechanism that hits it a lot, and everyone likes to code 'while(1)...' instead of 'for(;;)...' for some reason. There are a could of Windows header files which need you to disable extra warnings, and there are one or two that actually turn warnings DOWN without ever turning them back up, but thats pretty easy to locate and nail. |