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


Hi *,

some --enable-werror fixed needed to make the build compile on mac. As
there area multiple ways to solve those "may not be initialized" and
"comparing signed with unsigned" ones, I submit it here for comments
(esp. the first one in the lotuswordpro one - casting tag to unsigned
(as the only one where it could be negative (VO_INVALID) has been
checked already, but still people might prefer to handle it
differently)

ciao
Christian
diff --git a/lotuswordpro/source/filter/lwpobjid.cxx b/lotuswordpro/source/filter/lwpobjid.cxx
index c220068..8df3ffd 100644
--- a/lotuswordpro/source/filter/lwpobjid.cxx
+++ b/lotuswordpro/source/filter/lwpobjid.cxx
@@ -235,7 +235,7 @@ LwpObject* LwpObjectID::obj(VO_TYPE tag) const
     LwpObject* pObj = pObjMgr->QueryObject(*this);
     if( tag!=VO_INVALID &&  (pObj) )
     {
-        if(tag!=pObj->GetTag())
+        if((unsigned)tag!=pObj->GetTag())
         {
             pObj=NULL;
         }
diff --git a/lotuswordpro/source/filter/lwpoleobject.cxx 
b/lotuswordpro/source/filter/lwpoleobject.cxx
index 8a0e359..c29828f 100644
--- a/lotuswordpro/source/filter/lwpoleobject.cxx
+++ b/lotuswordpro/source/filter/lwpoleobject.cxx
@@ -266,7 +266,7 @@ void LwpOleObject::GetChildStorageName(char *pObjName)
     char sName[MAX_STREAMORSTORAGENAME];
     //LwpObjectID ID(nLowID, GetObjectID()->GetHigh());
     sprintf( sName, "%s%X,%X", "Ole",
-      GetObjectID()->GetHigh(), GetObjectID()->GetLow());
+      GetObjectID()->GetHigh(), (unsigned int)GetObjectID()->GetLow());
 
     strcpy( pObjName, sName);
     return;
diff --git a/lotuswordpro/source/filter/lwpparastyle.cxx 
b/lotuswordpro/source/filter/lwpparastyle.cxx
index 664751e..e92b971 100644
--- a/lotuswordpro/source/filter/lwpparastyle.cxx
+++ b/lotuswordpro/source/filter/lwpparastyle.cxx
@@ -657,7 +657,7 @@ void LwpParaStyle::ApplyTab(XFParaStyle *pParaStyle, LwpTabOverride *pTabOverRid
         double fLen = LwpTools::ConvertFromUnitsToMetric(nPos) - dMarginLeft;
 
         //get leader type
-        sal_Unicode cLeader;
+        sal_Unicode cLeader = NULL;
         LwpTab::LeaderType leader= pTab->GetLeaderType();
         switch(leader)
         {
diff --git a/writerperfect/source/filter/DocumentCollector.cxx 
b/writerperfect/source/filter/DocumentCollector.cxx
index 1ef8dcc..88e85f2 100644
--- a/writerperfect/source/filter/DocumentCollector.cxx
+++ b/writerperfect/source/filter/DocumentCollector.cxx
@@ -655,7 +655,7 @@ void DocumentCollector::defineOrderedListLevel(const WPXPropertyList &propList)
     // is starting a new list at level 1 (and only level 1)
     if (pOrderedListStyle == NULL || pOrderedListStyle->getListID() != id  ||
         (propList["libwpd:level"] && propList["libwpd:level"]->getInt()==1 && 
-         (propList["text:start-value"] && propList["text:start-value"]->getInt() != 
(mWriterListStates.top().miLastListNumber+1))))
+         (propList["text:start-value"] && propList["text:start-value"]->getInt() != 
(int)(mWriterListStates.top().miLastListNumber+1))))
     {
         WRITER_DEBUG_MSG(("Attempting to create a new ordered list style (listid: %i)\n", id));
         WPXString sName;
diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx
index b3d3323..dce5ece 100644
--- a/sc/source/core/tool/docoptio.cxx
+++ b/sc/source/core/tool/docoptio.cxx
@@ -482,7 +482,7 @@ ScDocCfg::ScDocCfg() :
                 break;
                 case SCFORMULAOPT_ENGLISH_FUNCNAME:
                 {
-                    sal_Bool bEnglish;
+                    sal_Bool bEnglish = false;
                     if (pValues[nProp] >>= bEnglish)
                         SetUseEnglishFuncName(bEnglish);
                 }

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.