EntBlog
Code, 3D, Games, Linux and much more...
Static Code Analysis
December 4, 2007 @ 3:01 | In Programming | No Comments |

While following the interesting thread about putting all of the platform libs into source control, I decided to upgrade the Win32 Platform SDK (now, Windows SDK) whose latest version can be found following this link: Microsoft® Windows® Software Development Kit Update for Windows Vista.
There, I found a very interesting new compiler flag: /analyze. This option, previously only available in the Visual Studio Team Suite and fully integrated in Visual Studio 2008, allows activating Static Code Analysis when compiling with any version of Visual Studio 2005 (you only have to add the path to the new cl.exe in the Visual Studio Options).
There is a great presentation given by Microsoft at the last Gamefest event about static code analysis: Static Code Analysis on Game Code.
After activating it in my project, lots of warnings appeared. The truth is that most of them were false positives, but I caught an obscure bug that worthed the effort of upgrading the compiler. To reduce the noise, __assume and __analysis_assume (properly integrated in your error and assert macros) were good allies.
And now, time to sleep…
Sat, 07 Nov 2009 15:33:05 +0100 / 19 queries. 1.335 seconds / 5 Users Online
|
|
|
|
Theme modified from Pool theme. Valid XHTML and CSS
About
Categories