Code Analysis VS2011

I recently installed the beta version of VS2011 to feel the new C ++ 11 features implemented by Microsoft in the latest version of my compiler.

I had an unforeseen problem if you return to using VS2010. I opened a sample Windows SDK 7.1 sample in VS2010.

Now, when I create VS2010, I get the following output, which means that the code analysis tool is running (apparently after compilation, but before binding)

1>------ Rebuild All started: Project: MFCaptureToFile, Configuration: Debug Win32 ------
1>  winmain.cpp
1>  capture.cpp
1>  Running Code Analysis for C/C++...
1>capture.cpp(112): error C2220: warning treated as error - no 'object' file generated
1>c:\program files\microsoft sdks\windows\v7.1\samples\multimedia\mediafoundation\mfcapturetofile\capture.cpp(105): warning C6309: Argument '3' is null: this does not adhere to function specification of 'IMFAttributes::GetAllocatedString'
1>c:\program files\microsoft sdks\windows\v7.1\samples\multimedia\mediafoundation\mfcapturetofile\capture.cpp(105): warning C6387: 'argument 3' might be '0': this does not adhere to the specification for the function 'IMFAttributes::GetAllocatedString': Lines: 98, 103, 105
1>c:\program files\microsoft sdks\windows\v7.1\samples\multimedia\mediafoundation\mfcapturetofile\capture.cpp(353): warning C6309: Argument '3' is null: this does not adhere to function specification of 'IMFAttributes::GetAllocatedString'
1>c:\program files\microsoft sdks\windows\v7.1\samples\multimedia\mediafoundation\mfcapturetofile\capture.cpp(353): warning C6387: 'argument 3' might be '0': this does not adhere to the specification for the function 'IMFAttributes::GetAllocatedString': Lines: 336, 338, 340, 343, 351, 353
1>C:\Program Files\Microsoft SDKs\Windows\v7.1\Include\ks.h(53): error C2220: warning treated as error - no 'object' file generated
1>c:\program files\microsoft sdks\windows\v7.1\include\ks.h(53): warning C6244: Local declaration of 'GUID_NULL' hides previous declaration at line '28' of 'c:\program files\microsoft sdks\windows\v7.1\include\cguid.h'
1>  Generating Code...
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

I tried to determine what changes in the project made the code analysis tool execute, but I can not find anything in the project properties. I tried to reload the project in VS2011, but there is no way to analyze the code that I can disable ( as suggested on MSDN ).

++, ++ CLR

, ( ), . - Microsoft! , , , - VS2011.

- , ? , - VS2011, , , , !

+5
1

, VS2010 Ultimate . VS2012, , vcxproj .

, :   <RunCodeAnalysis>true</RunCodeAnalysis> <EnablePREfast>true</EnablePREfast>

false, .

, VS2010, , VS2012.

+12

All Articles