[vtk-developers] Warning in VTK

Sebastien BARRE sebastien.barre at kitware.com
Thu Feb 21 09:24:10 EST 2002


At 2/21/2002 09:12 AM, Andy Cedilnik, on his way to pump up his contrib 
ratio :), wrote:

>warning C4127: conditional expression is constant
>
>This warning is issued in the cases like:
>
>while(1)
>{
>         // Do something
>}
>
>or
>
>#define SOMETHING 1
>...
>
>if ( SOMETHING == 1 )
>{
>         // Do something
>}
>
>All these cases are valid code and should not be reported as warnings.
>This is why I propose to put remove warning 4127 from compiling in the
>file vtkWin32Header.h:
>
>#pragma warning ( disable : 4127 )
>
>Any objection?

Yes.

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...

Thanks Andy


--
Sebastien Barre




More information about the vtk-developers mailing list