Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hello,

Since the last merging, I've got this :
Compiling: basic/source/runtime/runtime.cxx
cc1plus: warnings being treated as errors
/home/maryline/compile-libreoffice/libo/clone/libs-core/basic/source/runtime/runtime.cxx: In member function 'SbiForStack* SbiRuntime::FindForStackItemForCollection(BasicCollection*)': /home/maryline/compile-libreoffice/libo/clone/libs-core/basic/source/runtime/runtime.cxx:1247:75: error: operation on 'pCollection' may be undefined
dmake:  Error code 1, while making '../../unxlngi6/slo/runtime

Is this diff patch would be ok ?

diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 308550a..76b7daf 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -1244,7 +1244,7 @@ SbiForStack* SbiRuntime::FindForStackItemForCollection( class BasicCollection* p
     {
SbxVariable* pVar = p->refEnd.Is() ? (SbxVariable*)p->refEnd : NULL;
         if( p->eForType == FOR_EACH_COLLECTION && pVar != NULL &&
-            (pCollection = PTR_CAST(BasicCollection,pVar)) == pCollection )
+            (pCollection = PTR_CAST(BasicCollection,pVar)) != NULL)
         {
             pRet = p;
             break;

I think pCollection must be tested against NULL but perhaps it needs something else.

Of course, if you're ok, I can commit and push on master.

Julien.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.