Skylark (J-S) wrote:
> 
> I'm fine with suppressing C4706 as it's true that it's a warning that 
> only tells you that you *might* be doing something unsafe... Whether 
> it's actually safe or not is totally context-dependent.
> 


Blanket-supression of C4706 isn't really a good thing, since as you pointed 
out, it can actually point out an error (usually a typo by the developer). 
C4706 will not be generated if it is made explicitly clear what the intent of 
the conditional is.

i.e., instead of checking "if ( a = fxn() )", check "if ( (a = fxn()) != 0 )". 
This is covered in the MSDN page on C4706.

I actually prefer the latter syntax (which doesn't generate C4706) anyway, 
since it eliminates any possible confusion as to the intended operations.

------------------------
Matthew W Fuesz
Software Engineer Asc
Lockheed Martin STS

------------------
Read this topic online here:
http://osgforum.tevs.eu/viewtopic.php?p=4253#4253





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to