[vtk-developers] Warning in VTK

Andy Cedilnik Andy.Cedilnik at kitware.com
Thu Feb 21 10:01:56 EST 2002


>Can you please check that this warning might also detect usual typo like 
>this one :
>
>if (a = 1)
>{
>     // this is always executed, a == 1 was expected
>}
>
>in that case, I advise not to remove this warning...

This is reported as a warning:

C4706 assignment within conditional expression

It is already being ignored in VTK.
The problem is that this warning includes tings such as:

while ( ( a = array.size() ) )
{
         // Do something
}

In this case you want to assign.

So, do you want warning C4706 in or out?
Should we say to VTK developers that the assignment within
conditional is against coding standards?

                         Andy Cedilnik




More information about the vtk-developers mailing list