[vtk-developers] new warnings: explicitly assigning a variable to itself
Brad King
brad.king at kitware.com
Mon Jan 17 12:01:44 EST 2011
On 01/17/2011 11:21 AM, Sean McBride wrote:
> error = 0; error = error;
>
> The warning is:
>
> Charts/vtkPlotPointsTcl.cxx:43:20: warning: explicitly assigning a
> variable of type 'int' to itself [-Wself-assign]
> error = 0; error = error;
> ~~~~~ ^ ~~~~~
>
> The purpose of "error = error" escapes me, and yet this pattern is
> repeated in many files...
It is generated by vtkWrapTcl.c, and was added in 1999:
http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=31eb8902#patch35
Jim, I don't suppose you remember why?
Thanks,
-Brad
More information about the vtk-developers
mailing list