[Libreoffice] Warning in basic/source/runtime/runtime.cxx

Michael Meeks michael.meeks at novell.com
Tue May 31 02:27:19 PDT 2011

Hi Julien,

	Great to have you chasing this joke code:

-            (pCollection = PTR_CAST(BasicCollection,pVar)) == pCollection )

	Digging at what the code is used for it -seems- - that we want to find
this collection on the stack (if it is there), to alter the index a
'foreach' is using into it, so that it doesn't have an invalid index
next time around the loop, as/when we remove an item from the
collection. So something like [ I don't write basic ]:

	foreach a in collection do
		collection.remove (0)

	doesn't cause grief, so I don't think:

+            (pCollection = PTR_CAST(BasicCollection,pVar)) != NULL)

	that works. I believe this is just a cut/paste error from dr, and we
want this instead:

+            PTR_CAST(BasicCollection,pVar) == pCollection )

	I'll commit that, and wait for screams.

	Thanks for chasing it ! :-)



 michael.meeks at novell.com  <><, Pseudo Engineer, itinerant idiot

More information about the LibreOffice mailing list