<div class="gmail_quote">On Mon, Jan 17, 2011 at 12:01 PM, Brad King <span dir="ltr"><<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On 01/17/2011 11:21 AM, Sean McBride wrote:<br>
>   error = 0; error = error;<br>
><br>
> The warning is:<br>
><br>
> Charts/vtkPlotPointsTcl.cxx:43:20: warning: explicitly assigning a<br>
> variable of type 'int' to itself [-Wself-assign]<br>
>   error = 0; error = error;<br>
>              ~~~~~ ^ ~~~~~<br>
><br>
> The purpose of "error = error" escapes me, and yet this pattern is<br>
> repeated in many files...<br>
<br>
</div>It is generated by vtkWrapTcl.c, and was added in 1999:<br>
<br>
  <a href="http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=31eb8902#patch35" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=31eb8902#patch35</a><br>
<br>
Jim, I don't suppose you remember why?<br>
<br>
Thanks,<br>
<font color="#888888">-Brad<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br>Don't know if Jim will chime in here with a memory from back then or not.... but if I were to guess, I'd say it was probably to suppress a warning from a "compiler of the day" back then that produced an erroneous warning and this was a convenient "no-op" way to shut it up. That's a complete guess, though.<br>
<br>It does not look like the self-assignments are necessary. I'd say we should remove it and see what the dashboards look like without that code.<br><br>