[vtk-developers] Warning in VTK
Andy Cedilnik
Andy.Cedilnik at kitware.com
Thu Feb 21 10:51:56 EST 2002
>>All these cases are valid code and should not be reported as warnings.
>
>Valid code? - yes, but the right code? - probably not. We can easily
>change all while (1) statements to use a conditional variable, and the
>#define case seems like something that should be done another way as well.
>That will get rid of the warnings and still pick up the case where someone
>does something silly like if ( x = 1 ) {}.
So should we add this to VTK coding standard?
I mean, if this is a decision, then I suggest we put it in the standard, and
make everybody use /W4.
Also, here is another case that is a "valid code":
if ( sizeof(int) == 4 )
{
// Do something
}
sizeof(int) is replaced with constant and so this also issues
a warning. So, is this "valid code" or valid code?
Andy
More information about the vtk-developers
mailing list