I have recently upgraded my project from Visual Studio 2008 to Visual Studio 2010.
Enabling code by analyzing and compiling in compilation, I'm getting warnings CA1806: Ignore method results.
I have been successful in reducing code which generates a warning for this code:
H file:
public ref class Foo {public: zero times (); };
. Cpp file:
zero foo :: bar (try {} hold (const std :: exception & amp; //) Here I get the warning {}}
WARNING:
CA1806: Microsoft. Usage: 'Foo :: Bar (empty)' Call 'Global :: __ CXArgasterExpression object (zero *, zero *)', but does not use HRESULT or error code that returns the error conditions or low-resource Conditions may have unexpected behavior. Use the result in a conditional statement, specify the result in a variable, or pass it as argument in some other way.
If I try to use the exception value or (...)
the warning still appears if I Instead of catching the managed exception or compiling it in debug, I do not get a warning.
Why did I get this warning?
UPDATE
I have decided to open.
This is a Visual Studio 2010 bug.
As you can see, Microsoft has rebuilt the bug and has not decided to suspend any solution with the solution.
You are welcome to vote for the bug, so Microsoft will decide to solve it soon.
Comments
Post a Comment