[vtk-developers] vtkBitArray.cxx:592:1: warning: all paths through this function will call itself [-Winfinite-recursion]

Robert Maynard robert.maynard at kitware.com
Wed Jan 15 11:50:45 EST 2014


I don't really know the code, but a quick inspection shows that
RemoveTuple(int) throws a vtkerror if you try to remove anything but the
last element. I would say the quick fix is to also make RemoveFirstTuple
throw a vtkerror that the method isn't implemented.


On Wed, Jan 15, 2014 at 11:44 AM, Sean McBride <sean at rogue-research.com>wrote:

> Hi all,
>
> I updated Rogue7 to (a newer) clang svn trunk, and they've added a new
> warning that I believe has found a real bug:
>
> void vtkBitArray::RemoveFirstTuple()
> {
>   this->RemoveFirstTuple();
>   this->DataChanged();
> }
>
> vtkBitArray.cxx:592:1: warning: all paths through this function will call
> itself [-Winfinite-recursion]
>
> Sure looks like infinite recursion to me...
>
> There is no coverage of that function:
> <
> http://open.cdash.org/viewCoverageFile.php?buildid=3176671&fileid=11422264
> >
>
> By analogy with vtkDataArrayTemplate maybe the first line should be:
>
>   this->RemoveTuple(0);
>
> Someone know this code?
>
> Cheers,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20140115/78ccc27c/attachment-0002.html>


More information about the vtk-developers mailing list