[Libreoffice-commits] .: 6 commits - mdds/mdds_0.5.3.patch sc/source

Tor Lillqvist tml at kemper.freedesktop.org
Mon Oct 17 10:34:25 PDT 2011


 mdds/mdds_0.5.3.patch                            |    8 ++++++++
 sc/source/core/tool/addincol.cxx                 |    1 -
 sc/source/core/tool/rangelst.cxx                 |    5 ++++-
 sc/source/filter/excel/xeformula.cxx             |    2 +-
 sc/source/filter/xml/XMLExportDatabaseRanges.cxx |    2 +-
 sc/source/ui/miscdlgs/acredlin.cxx               |    4 ++--
 sc/source/ui/miscdlgs/warnbox.cxx                |    2 +-
 7 files changed, 17 insertions(+), 7 deletions(-)

New commits:
commit 045e8340a04350b192152bd4918669df9fdd648e
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Mon Oct 17 19:10:06 2011 +0300

    WaE: unsafe mix of type 'bool' and type 'sal_Bool' in operation

diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index d377b91..9fb61fa 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -452,7 +452,7 @@ void ScXMLExportDatabaseRanges::WriteSortDescriptor(const uno::Sequence <beans::
         bool bCaseSensitive(aSortFields[0].IsCaseSensitive);
         for (i = 1; i < nSortFields; ++i)
         {
-            OSL_ENSURE(bCaseSensitive == aSortFields[i].IsCaseSensitive, "seems that it is now possible to have every field case sensitive");
+            OSL_ENSURE(bCaseSensitive == (bool) aSortFields[i].IsCaseSensitive, "seems that it is now possible to have every field case sensitive");
         }
 #endif
         if (aSortFields[0].CollatorLocale.Language.getLength())
commit 0193dc6d690967ee5b047c6bf7905d8ce0510609
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Mon Oct 17 19:00:07 2011 +0300

    WaE: potentially uninitialized local variable used

diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx
index 86acbc4..1503dcf 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -2122,7 +2122,7 @@ void XclExpFmlaCompImpl::ProcessExternalName( const XclExpScToken& rTokData )
             }
 
             // insert the new external name and create the tNameX token
-            sal_uInt16 nExtSheet, nExtName;
+            sal_uInt16 nExtSheet = 0, nExtName = 0;
             const ::rtl::OUString* pFile = rExtRefMgr.getExternalFileName( nFileId );
             if( pFile && mxData->mpLinkMgr->InsertExtName( nExtSheet, nExtName, *pFile, rName, xArray ) )
             {
commit bcfeaa2e7b2247480e857814a00f42fd7bb524c2
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Mon Oct 17 18:58:12 2011 +0300

    WaE: unreachable code

diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx
index e02dd11..97ef21c 100644
--- a/sc/source/core/tool/rangelst.cxx
+++ b/sc/source/core/tool/rangelst.cxx
@@ -802,9 +802,12 @@ int SAL_CALL ScRangePairList_QsortNameCompare( const void* p1, const void* p2 )
                         return 0;
                 }
             }
-            return 0;
     }
+#ifndef _MSC_VER // MSVC is good enough to warn about unreachable code here.
+                 // Or stupid enough to bother warning about it, depending
+                 // on your point of view.
     return 0; // just in case
+#endif
 }
 
 //-----------------------------------------------------------------------------
commit 76faa3082022a402c5e567d149bfeb24fcfc99a0
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Mon Oct 17 18:46:58 2011 +0300

    WaE: unreachable code

diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index acc4d10..e4c6734 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -751,7 +751,6 @@ sal_Bool lcl_ValidReturnType( const uno::Reference<reflection::XIdlClass>& xClas
                     IsTypeName( sName, getCppuType((uno::Sequence< uno::Sequence<uno::Any> >*)0) ) );
             }
     }
-    return false;
 }
 
 ScAddInArgumentType lcl_GetArgType( const uno::Reference<reflection::XIdlClass>& xClass )
commit 8a89eb87d57b22cd755e2ce2fe2166144894897e
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Mon Oct 17 18:46:06 2011 +0300

    WaE: unreachable code

diff --git a/mdds/mdds_0.5.3.patch b/mdds/mdds_0.5.3.patch
index 7903431..40aedb1 100644
--- a/mdds/mdds_0.5.3.patch
+++ b/mdds/mdds_0.5.3.patch
@@ -1,5 +1,13 @@
 --- misc/mdds_0.5.3/include/mdds/mixed_type_matrix_def.inl	2011-07-13 13:26:27.000000000 -0600
 +++ misc/build/mdds_0.5.3/include/mdds/mixed_type_matrix_def.inl	2011-07-20 02:02:21.164198900 -0600
+@@ -44,7 +44,6 @@
+         default:
+             throw matrix_error("unknown density type");
+     }
+-    return NULL;
+ }
+ 
+ template<typename _String, typename _Flag>
 @@ -216,8 +216,8 @@
          // assignment to self.
          return;
commit 4cc0dfb2bb4b7e41464590d18070c439bc4af756
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Mon Oct 17 18:00:25 2011 +0300

    WaE: unsafe mix of type 'bool' and type foo in operation

diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx
index e22dd14..69585be 100644
--- a/sc/source/ui/miscdlgs/acredlin.cxx
+++ b/sc/source/ui/miscdlgs/acredlin.cxx
@@ -1717,8 +1717,8 @@ IMPL_LINK( ScAcceptChgDlg, UpdateSelectionHdl, Timer*, EMPTYARG )
         ScRedlinData* pEntryData = (ScRedlinData*) pEntry->GetUserData();
         if( pEntryData )
         {
-            bRejectFlag &= pEntryData->bIsRejectable;
-            bAcceptFlag &= pEntryData->bIsAcceptable;
+            bRejectFlag &= (bool) pEntryData->bIsRejectable;
+            bAcceptFlag &= (bool) pEntryData->bIsAcceptable;
 
             const ScChangeAction* pScChangeAction = (ScChangeAction*) pEntryData->pData;
             if( pScChangeAction && (pScChangeAction->GetType() != SC_CAT_DELETE_TABS) &&
diff --git a/sc/source/ui/miscdlgs/warnbox.cxx b/sc/source/ui/miscdlgs/warnbox.cxx
index 8fa78a0..1a68fe3 100644
--- a/sc/source/ui/miscdlgs/warnbox.cxx
+++ b/sc/source/ui/miscdlgs/warnbox.cxx
@@ -79,7 +79,7 @@ ScReplaceWarnBox::ScReplaceWarnBox( Window* pParent ) :
 
 bool ScReplaceWarnBox::IsDialogEnabled()
 {
-    return SC_MOD()->GetInputOptions().GetReplaceCellsWarn() == true;
+    return ((bool) SC_MOD()->GetInputOptions().GetReplaceCellsWarn()) == true;
 }
 
 void ScReplaceWarnBox::DisableDialog()


More information about the Libreoffice-commits mailing list