[vtk-developers] Warning in VTK
Sebastien BARRE
sebastien.barre at kitware.com
Thu Feb 21 10:06:09 EST 2002
At 2/21/2002 10:01 AM, Andy Cedilnik wrote:
>>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.
Ouch.
>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?
I'm not very fond of this style of coding, so in my own code I would have
C4706 in, but in that case I guess it might be too late for VTK.
As far as C4127 is concerned, no objections to disable it.
--
Sebastien Barre
More information about the vtk-developers
mailing list