[Libreoffice-commits] .: 4 commits - binfilter/bf_svtools binfilter/bf_svx lotuswordpro/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Jan 11 09:04:57 PST 2011


 binfilter/bf_svtools/source/misc1/makefile.mk        |    2 -
 binfilter/bf_svtools/source/misc1/svt_adrparse.cxx   |   20 ++++++++---
 binfilter/bf_svtools/source/misc1/svt_strmadpt.cxx   |   32 ++++++++++++-------
 binfilter/bf_svx/source/options/makefile.mk          |    1 
 binfilter/bf_svx/source/options/svx_asiancfg.cxx     |    2 -
 binfilter/bf_svx/source/svxlink/makefile.mk          |    2 -
 binfilter/bf_svx/source/svxlink/svx_fileobj.cxx      |    3 +
 binfilter/bf_svx/source/svxlink/svx_linkmgr.cxx      |    4 +-
 lotuswordpro/source/filter/xfilter/xfsaxattrlist.hxx |    4 +-
 9 files changed, 42 insertions(+), 28 deletions(-)

New commits:
commit 48673a31f1097b8602cdc414239ce833fb96e8ff
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 11 15:50:48 2011 +0000

    WaE: this dir is warning free now

diff --git a/binfilter/bf_svx/source/options/makefile.mk b/binfilter/bf_svx/source/options/makefile.mk
index a225b14..5121589 100644
--- a/binfilter/bf_svx/source/options/makefile.mk
+++ b/binfilter/bf_svx/source/options/makefile.mk
@@ -25,7 +25,6 @@
 #
 #*************************************************************************
 
-EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
 PRJ=..$/..$/..
 BFPRJ=..$/..
 
diff --git a/binfilter/bf_svx/source/options/svx_asiancfg.cxx b/binfilter/bf_svx/source/options/svx_asiancfg.cxx
index f3a1059..d766d3b 100644
--- a/binfilter/bf_svx/source/options/svx_asiancfg.cxx
+++ b/binfilter/bf_svx/source/options/svx_asiancfg.cxx
@@ -169,7 +169,7 @@ using namespace ::com::sun::star::lang;
 /*N*/ 	return aRet;
 /*N*/ }
 
-void SvxAsianConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ) {}
+void SvxAsianConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& /*rPropertyNames*/ ) {}
 void SvxAsianConfig::Commit() {}
 }
 
commit fb7be47eab4e01f1a2f942b9583ce34fdc1afc1d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 11 15:50:02 2011 +0000

    WaE: this dir is warning free now

diff --git a/binfilter/bf_svx/source/svxlink/makefile.mk b/binfilter/bf_svx/source/svxlink/makefile.mk
index 80fd00c..597100b 100644
--- a/binfilter/bf_svx/source/svxlink/makefile.mk
+++ b/binfilter/bf_svx/source/svxlink/makefile.mk
@@ -25,8 +25,6 @@
 #
 #*************************************************************************
 
-EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
-
 PRJ=..$/..$/..
 BFPRJ=..$/..
 
diff --git a/binfilter/bf_svx/source/svxlink/svx_fileobj.cxx b/binfilter/bf_svx/source/svxlink/svx_fileobj.cxx
index ad03f1e..364ae1a 100644
--- a/binfilter/bf_svx/source/svxlink/svx_fileobj.cxx
+++ b/binfilter/bf_svx/source/svxlink/svx_fileobj.cxx
@@ -74,7 +74,7 @@ using namespace ::com::sun::star::uno;
 
 
 /*N*/ SvFileObject::SvFileObject()
-/*N*/ 	: nType( FILETYPE_TEXT ), pDownLoadData( 0 )
+/*N*/ 	: pDownLoadData( 0 ), nType( FILETYPE_TEXT )
 /*N*/ {
 /*N*/ 	bLoadAgain = bMedUseCache = TRUE;
 /*N*/ 	bSynchron = bLoadError = bWaitForData = bDataReady = bNativFormat =
@@ -472,6 +472,7 @@ JP 28.02.96: noch eine Baustelle:
 
 /*?*/ IMPL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef*, pDelMed )
 /*?*/ {
+/*?*/ 	(void)pThis;
 /*?*/ 	delete pDelMed;
 /*?*/ 	return 0;
 /*?*/ }
diff --git a/binfilter/bf_svx/source/svxlink/svx_linkmgr.cxx b/binfilter/bf_svx/source/svxlink/svx_linkmgr.cxx
index 42ef272..22d5058 100644
--- a/binfilter/bf_svx/source/svxlink/svx_linkmgr.cxx
+++ b/binfilter/bf_svx/source/svxlink/svx_linkmgr.cxx
@@ -45,9 +45,9 @@ namespace binfilter {
 
 
 
-/*N*/ SvxLinkManager::SvxLinkManager( SvPersist * pPersist )
+/*N*/ SvxLinkManager::SvxLinkManager( SvPersist * pInPersist )
 /*N*/ {
-/*N*/ 	SvLinkManager::SetPersist( pPersist );
+/*N*/ 	SvLinkManager::SetPersist( pInPersist );
 /*N*/ }
 
 /*N*/ ::binfilter::SvLinkSourceRef SvxLinkManager::CreateObj( ::binfilter::SvBaseLink * pLink )
commit ffc2f8b2515cf5f3952283d578acc40d5646dfc5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 11 15:41:45 2011 +0000

    WaE: this dir is warning free now

diff --git a/binfilter/bf_svtools/source/misc1/makefile.mk b/binfilter/bf_svtools/source/misc1/makefile.mk
index 1e17d8e..4d86c7d 100644
--- a/binfilter/bf_svtools/source/misc1/makefile.mk
+++ b/binfilter/bf_svtools/source/misc1/makefile.mk
@@ -25,8 +25,6 @@
 #
 #*************************************************************************
 
-EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
-
 PRJ=..$/..$/..
 
 PRJNAME=binfilter
diff --git a/binfilter/bf_svtools/source/misc1/svt_adrparse.cxx b/binfilter/bf_svtools/source/misc1/svt_adrparse.cxx
index 8d91c8d..4a83612 100644
--- a/binfilter/bf_svtools/source/misc1/svt_adrparse.cxx
+++ b/binfilter/bf_svtools/source/misc1/svt_adrparse.cxx
@@ -168,8 +168,8 @@ inline void SvAddressParser_Impl::addTokenToRealName()
         if (!m_pRealNameBegin)
             m_pRealNameBegin = m_pRealNameContentBegin = m_pCurTokenBegin;
         else if (m_pRealNameEnd < m_pCurTokenBegin - 1
-                 || m_pRealNameEnd == m_pCurTokenBegin - 1
-                    && *m_pRealNameEnd != ' ')
+                 || (m_pRealNameEnd == m_pCurTokenBegin - 1
+                    && *m_pRealNameEnd != ' '))
             m_bRealNameReparse = true;
         m_pRealNameEnd = m_pRealNameContentEnd = m_pCurTokenEnd;
     }
@@ -491,6 +491,7 @@ SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser,
                     addTokenToAddrSpec(ELEMENT_ITEM);
                 }
                 if (!m_bRealNameFinished && m_eState != AFTER_LESS)
+                {
                     if (m_bCurTokenReparse)
                     {
                         if (!m_pRealNameBegin)
@@ -512,16 +513,19 @@ SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser,
                         m_pRealNameEnd = m_pCurTokenEnd;
                         m_bRealNameReparse = true;
                     }
+                }
                 m_eType = TOKEN_ATOM;
                 break;
 
             case TOKEN_DOMAIN:
                 if (m_pAddrSpec->m_eLastElem != ELEMENT_END)
+                {
                     if (m_pAddrSpec->m_bAtFound
                         && m_pAddrSpec->m_eLastElem == ELEMENT_DELIM)
                         addTokenToAddrSpec(ELEMENT_ITEM);
                     else
                         m_pAddrSpec->reset();
+                }
                 addTokenToRealName();
                 m_eType = TOKEN_ATOM;
                 break;
@@ -599,6 +603,7 @@ SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser,
 
             case '@':
                 if (m_pAddrSpec->m_eLastElem != ELEMENT_END)
+                {
                     if (!m_pAddrSpec->m_bAtFound
                         && m_pAddrSpec->m_eLastElem == ELEMENT_ITEM)
                     {
@@ -607,6 +612,7 @@ SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser,
                     }
                     else
                         m_pAddrSpec->reset();
+                }
                 addTokenToRealName();
                 break;
 
@@ -624,8 +630,8 @@ SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser,
                 else
                 {
                     m_pAddrSpec = m_aInnerAddrSpec.isValid()
-                                  || !m_aOuterAddrSpec.isValid()
-                                         && m_aInnerAddrSpec.isPoorlyValid() ?
+                                  || (!m_aOuterAddrSpec.isValid()
+                                         && m_aInnerAddrSpec.isPoorlyValid()) ?
                                       &m_aInnerAddrSpec :
                                   m_aOuterAddrSpec.isPoorlyValid() ?
                                       &m_aOuterAddrSpec : 0;
@@ -653,11 +659,11 @@ SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser,
                         }
                         UniString aTheRealName;
                         if (!m_pRealNameBegin
-                            || m_pAddrSpec == &m_aOuterAddrSpec
+                            || (m_pAddrSpec == &m_aOuterAddrSpec
                                && m_pRealNameBegin
                                       == m_aOuterAddrSpec.m_pBegin
                                && m_pRealNameEnd == m_aOuterAddrSpec.m_pEnd
-                               && m_pFirstCommentBegin)
+                               && m_pFirstCommentBegin))
                             if (!m_pFirstCommentBegin)
                                 aTheRealName = aTheAddrSpec;
                             else if (m_bFirstCommentReparse)
@@ -737,10 +743,12 @@ SvAddressParser_Impl::SvAddressParser_Impl(SvAddressParser * pParser,
 
             case '.':
                 if (m_pAddrSpec->m_eLastElem != ELEMENT_END)
+                {
                     if (m_pAddrSpec->m_eLastElem != ELEMENT_DELIM)
                         addTokenToAddrSpec(ELEMENT_DELIM);
                     else
                         m_pAddrSpec->reset();
+                }
                 addTokenToRealName();
                 break;
 
diff --git a/binfilter/bf_svtools/source/misc1/svt_strmadpt.cxx b/binfilter/bf_svtools/source/misc1/svt_strmadpt.cxx
index c6256ec..38591b4 100644
--- a/binfilter/bf_svtools/source/misc1/svt_strmadpt.cxx
+++ b/binfilter/bf_svtools/source/misc1/svt_strmadpt.cxx
@@ -306,10 +306,16 @@ SvLockBytesInputStream::readBytes(uno::Sequence< sal_Int8 > & rData,
 {
     if (!m_xLockBytes.Is())
         throw io::NotConnectedException();
-    if (nBytesToRead < 0
-        || m_nPosition > std::numeric_limits< ULONG >::max()
-           && nBytesToRead > 0)
+    if (
+         nBytesToRead < 0 ||
+         (
+          static_cast<sal_uInt64>(m_nPosition) > SAL_MAX_SIZE &&
+          nBytesToRead > 0
+         )
+       )
+    {
         throw io::IOException();
+    }
     rData.realloc(nBytesToRead);
     sal_Int32 nSize = 0;
     while (nSize < nBytesToRead)
@@ -338,7 +344,7 @@ SvLockBytesInputStream::readSomeBytes(uno::Sequence< sal_Int8 > & rData,
 {
     if (!m_xLockBytes.Is())
         throw io::NotConnectedException();
-    if (m_nPosition > std::numeric_limits< ULONG >::max()
+    if (static_cast<sal_uInt64>(m_nPosition) > SAL_MAX_SIZE
         && nMaxBytesToRead > 0)
         throw io::IOException();
     rData.realloc(nMaxBytesToRead);
@@ -387,11 +393,12 @@ sal_Int32 SAL_CALL SvLockBytesInputStream::available()
     SvLockBytesStat aStat;
     if (m_xLockBytes->Stat(&aStat, SVSTATFLAG_DEFAULT) != ERRCODE_NONE)
         throw io::IOException();
-    return aStat.nSize <= m_nPosition ?
+    return aStat.nSize <= static_cast<sal_uInt64>(m_nPosition) ?
                0 :
-               std::min< sal_uInt32 >(
-                   sal_uInt32(aStat.nSize - m_nPosition),
-                   sal_uInt32(std::numeric_limits< sal_Int32 >::max()));
+           static_cast<sal_Size>(aStat.nSize - m_nPosition) <=
+                   static_cast<sal_uInt32>(SAL_MAX_INT32) ?
+               static_cast<sal_Int32>(aStat.nSize - m_nPosition) :
+               SAL_MAX_INT32;
 }
 
 //============================================================================
@@ -578,6 +585,7 @@ void SvInputStream::FlushData()
 ULONG SvInputStream::SeekPos(ULONG nPos)
 {
     if (open())
+    {
         if (nPos == STREAM_SEEK_TO_END)
             if (m_nSeekedFrom == STREAM_SEEK_TO_END)
             {
@@ -585,7 +593,8 @@ ULONG SvInputStream::SeekPos(ULONG nPos)
                     try
                     {
                         sal_Int64 nLength = m_xSeekable->getLength();
-                        if (nLength < STREAM_SEEK_TO_END)
+                        if (static_cast<sal_uInt64>(nLength)
+                            < STREAM_SEEK_TO_END)
                         {
                             m_nSeekedFrom = Tell();
                             return ULONG(nLength);
@@ -615,6 +624,7 @@ ULONG SvInputStream::SeekPos(ULONG nPos)
             m_nSeekedFrom = STREAM_SEEK_TO_END;
             return nPos;
         }
+    }
     SetError(ERRCODE_IO_CANTSEEK);
     return Tell();
 }
@@ -683,8 +693,8 @@ void SvInputStream::RemoveMark(ULONG nPos)
 bool SvDataPipe_Impl::remove(Page * pPage)
 {
     if (pPage != m_pFirstPage || m_pReadPage == m_pFirstPage
-        || !m_aMarks.empty()
-           && *m_aMarks.begin() < m_pFirstPage->m_nOffset + m_nPageSize)
+        || (!m_aMarks.empty()
+           && *m_aMarks.begin() < m_pFirstPage->m_nOffset + m_nPageSize))
         return false;
 
     m_pFirstPage = m_pFirstPage->m_pNext;
commit 3bd14e765935648238c1782808443757bee1d07e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jan 11 14:16:39 2011 +0000

    cppcheck: this can be const

diff --git a/lotuswordpro/source/filter/xfilter/xfsaxattrlist.hxx b/lotuswordpro/source/filter/xfilter/xfsaxattrlist.hxx
index 13d2183..2375442 100644
--- a/lotuswordpro/source/filter/xfilter/xfsaxattrlist.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfsaxattrlist.hxx
@@ -84,7 +84,7 @@ public:
 
     virtual void	Clear();
 
-    Reference<XAttributeList>	GetAttributeList();
+    Reference<XAttributeList>	GetAttributeList() const;
 
     friend class XFSaxStream;
 private:
@@ -93,7 +93,7 @@ private:
 
 };
 
-inline Reference<XAttributeList>	XFSaxAttrList::GetAttributeList()
+inline Reference<XAttributeList>	XFSaxAttrList::GetAttributeList() const
 {
     return m_xAttrList;
 }


More information about the Libreoffice-commits mailing list