<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Dec 2, 2015 at 6:31 PM, Sean McBride <span dir="ltr"><<a href="mailto:sean@rogue-research.com" target="_blank">sean@rogue-research.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi all,<br>
<br>
Anyone know these classes?  These cppcheck diagnostics are not false positives.<br>
<br>
<br>
(a)<br>
uselessAssignmentPtrArg,Common/DataModel/vtkPlanes.cxx:341,warning,Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?<br>
<br>
This is likely copy-paste from method above.  Fixing it may require changing the signature of this public API.<br></blockquote><div><br></div><div>No need to change the API, just remove the "else" clause.  Simple fix.</div><div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
(b)<br>
stlcstr,IO/Export/vtkX3DExporterFIWriter.cxx:143,error,Dangerous usage of c_str(). The value returned by c_str() is invalid after this call.<br>
<br>
Change return type?  Make copy?<br></blockquote><div><br></div><div>Should return a std::string.  Sebastien, can you take a look?</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
(c)<br>
duplicateExpressionTernary,IO/Xdmf2/vtkXdmfHeavyData.cxx:1199,style,Same expression in both branches of ternary operator.<br>
<br>
  count[0] += (update_extents[5] - update_extents[4] > 0)? 1 : 1;<br>
<br>
Clearly odd.<br></blockquote><div><br></div><div>Should be 0 : 1.  Utkarsh?  Berk?</div><div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
(d)<br>
duplicateExpression,Rendering/Volume/vtkGPUVolumeRayCastMapper.cxx:296,style,Same expression on both sides of '-'.<br>
<br>
Copy-paste?  Missing +1?<br></blockquote><div><br></div><div>Just change it to "extents[2*cc] = 0;" to silence the warning.  It looks correct as-is.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
(e)<br>
knownConditionTrueFalse,Interaction/Widgets/vtkLineWidget.cxx:743,style,Condition '!forward' is always true<br>
<br>
<br>
Copy-paste?  or failure to use return value of ForwardEvent()?<br></blockquote><div><br></div><div>Looks like it.  Calls should be "forward = this->ForwardEvent(..."</div><div><br></div><div> - David</div></div><br></div></div>