connectivity/source/drivers/jdbc/Object.cxx               |    9 ++++++---
 connectivity/source/parse/sqlnode.cxx                     |    1 +
 cppu/source/uno/sequence.cxx                              |    2 ++
 desktop/source/deployment/registry/package/dp_package.cxx |    2 +-
 extensions/source/plugin/unx/npwrap.cxx                   |    4 ++--
 forms/source/component/DatabaseForm.cxx                   |    7 +++++--
 offapi/com/sun/star/packages/zip/XZipFileAccess.idl       |    1 +
 package/inc/zipfileaccess.hxx                             |    2 +-
 package/source/zippackage/zipfileaccess.cxx               |    2 +-
 sw/source/filter/ww8/ww8par.cxx                           |    2 +-
 vcl/headless/svpinst.cxx                                  |    8 ++++----
 vcl/unx/generic/app/saldata.cxx                           |    4 ++--
 12 files changed, 27 insertions(+), 17 deletions(-)

New commits:
commit 1d200aa17096aceca5fe7d3d1d8e4b939e5cb3fd
Author: Caolán McNamara <caol...@redhat.com>
Date:   Mon Oct 27 13:44:55 2014 +0000

    coverity#706590 Uncaught exception
    
    Change-Id: I2005b792c74ad5a5f58c831dcc7caa5134280890

diff --git a/offapi/com/sun/star/packages/zip/XZipFileAccess.idl 
b/offapi/com/sun/star/packages/zip/XZipFileAccess.idl
index 58e7842..af3ac00 100644
--- a/offapi/com/sun/star/packages/zip/XZipFileAccess.idl
+++ b/offapi/com/sun/star/packages/zip/XZipFileAccess.idl
@@ -45,6 +45,7 @@ interface XZipFileAccess: ::com::sun::star::uno::XInterface
     ::com::sun::star::io::XInputStream getStreamByPattern( [in] string 
aPattern )
         raises( ::com::sun::star::container::NoSuchElementException,
                 ::com::sun::star::io::IOException,
+                ::com::sun::star::packages::WrongPasswordException,
                 ::com::sun::star::packages::zip::ZipException );
 
 };
diff --git a/package/inc/zipfileaccess.hxx b/package/inc/zipfileaccess.hxx
index 6d3b2d9..33d3f33 100644
--- a/package/inc/zipfileaccess.hxx
+++ b/package/inc/zipfileaccess.hxx
@@ -82,7 +82,7 @@ public:
     virtual sal_Bool SAL_CALL hasElements(  ) throw 
(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
     // XZipFileAccess
-    virtual ::com::sun::star::uno::Reference< 
::com::sun::star::io::XInputStream > SAL_CALL getStreamByPattern( const 
OUString& aPattern ) throw 
(::com::sun::star::container::NoSuchElementException, 
::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, 
css::packages::zip::ZipException, std::exception) SAL_OVERRIDE;
+    virtual ::com::sun::star::uno::Reference< 
::com::sun::star::io::XInputStream > SAL_CALL getStreamByPattern( const 
OUString& aPattern ) throw 
(::com::sun::star::container::NoSuchElementException, 
::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException, 
css::packages::WrongPasswordException, css::packages::zip::ZipException, 
std::exception) SAL_OVERRIDE;
 
     // XComponent
     virtual void SAL_CALL dispose(  ) throw 
(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/package/source/zippackage/zipfileaccess.cxx 
b/package/source/zippackage/zipfileaccess.cxx
index 0efa97d..ccd0746 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -358,7 +358,7 @@ sal_Bool SAL_CALL OZipFileAccess::hasElements()
 // XZipFileAccess
 uno::Reference< io::XInputStream > SAL_CALL 
OZipFileAccess::getStreamByPattern( const OUString& aPatternString )
     throw ( container::NoSuchElementException,
-            io::IOException, packages::zip::ZipException,
+            io::IOException, packages::WrongPasswordException, 
packages::zip::ZipException,
             uno::RuntimeException, std::exception )
 {
     ::osl::MutexGuard aGuard( m_aMutexHolder->GetMutex() );
commit 0095bccdf5e31de6ec6d1a3d83cc31efc8c1daae
Author: Caolán McNamara <caol...@redhat.com>
Date:   Mon Oct 27 13:41:00 2014 +0000

    coverity#706321 Uncaught exception
    
    Change-Id: Ie3b66520ab0c859272a4b0291f6c907e7fce61e5

diff --git a/connectivity/source/drivers/jdbc/Object.cxx 
b/connectivity/source/drivers/jdbc/Object.cxx
index 24058cf..5c02098 100644
--- a/connectivity/source/drivers/jdbc/Object.cxx
+++ b/connectivity/source/drivers/jdbc/Object.cxx
@@ -219,10 +219,13 @@ void java_lang_Object::ThrowSQLException( JNIEnv* 
_pEnvironment, const Reference
 
 void java_lang_Object::ThrowRuntimeException( JNIEnv* _pEnvironment, const 
Reference< XInterface>& _rxContext )
 {
-    SQLException aException;
-    if ( lcl_translateJNIExceptionToUNOException( _pEnvironment, _rxContext, 
aException ) )
+    try
+    {
+        ThrowSQLException(_pEnvironment, _rxContext);
+    }
+    catch (const SQLException& e)
     {
-        throw WrappedTargetRuntimeException(aException.Message, 
aException.Context, makeAny(aException));
+        throw WrappedTargetRuntimeException(e.Message, e.Context, makeAny(e));
     }
 }
 
commit 8fbbb94a3914223de1f690090e86a1ec9fbdaa30
Author: Caolán McNamara <caol...@redhat.com>
Date:   Mon Oct 27 13:38:39 2014 +0000

    coverity#706537 Uncaught exception
    
    Change-Id: I687948ef04e4ffdce51a7ac20854d6ebe96f1f25

diff --git a/forms/source/component/DatabaseForm.cxx 
b/forms/source/component/DatabaseForm.cxx
index 1fe1069..dd1bc79 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -388,10 +388,14 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& 
_cloneSource )
                 setPropertyValue( pSourceProperty->Name, 
xSourceProps->getPropertyValue( pSourceProperty->Name ) );
             }
         }
+        catch(const RuntimeException&)
+        {
+            throw;
+        }
         catch(const Exception&)
         {
             css::uno::Any a(cppu::getCaughtException());
-            throw WrappedTargetException(
+            throw WrappedTargetRuntimeException(
                 "Could not clone the given database form.",
                 *const_cast< ODatabaseForm* >( &_cloneSource ),
                 a
@@ -401,7 +405,6 @@ ODatabaseForm::ODatabaseForm( const ODatabaseForm& 
_cloneSource )
     osl_atomic_decrement( &m_refCount );
 }
 
-
 void ODatabaseForm::impl_construct()
 {
     // aggregate a row set
commit 6a0985eca284e6e2eb6a80e284ab5c59d8b005f7
Author: Caolán McNamara <caol...@redhat.com>
Date:   Mon Oct 27 13:33:54 2014 +0000

    coverity#1209023 silence Unchecked return value from library
    
    Change-Id: I7340b9ad9d482f6835ff7a4755df451fd146b86c

diff --git a/desktop/source/deployment/registry/package/dp_package.cxx 
b/desktop/source/deployment/registry/package/dp_package.cxx
index 5e4f96d..a3903d2 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -1398,7 +1398,7 @@ Reference<deployment::XPackage> 
BackendImpl::PackageImpl::bindBundleItem(
         if (notifyDetectionError ||
             !exc.isExtractableTo( 
cppu::UnoType<lang::IllegalArgumentException>::get()) )
         {
-            interactContinuation(
+            (void)interactContinuation(
                 Any( lang::WrappedTargetException("bundle item error!",
                          static_cast<OWeakObject *>(this), exc ) ),
                 cppu::UnoType<task::XInteractionApprove>::get(), xCmdEnv, 0, 0 
);
commit 0e36884e78f30e546633bf0bcd814005c5b9b8c2
Author: Caolán McNamara <caol...@redhat.com>
Date:   Mon Oct 27 13:33:17 2014 +0000

    coverity#982164 silence Unchecked return value from library
    
    Change-Id: Ie2479e3dc73a7c7e8d2d0c5c979bde2ea5d05a1e

diff --git a/extensions/source/plugin/unx/npwrap.cxx 
b/extensions/source/plugin/unx/npwrap.cxx
index 5e0c1a9..0cb0af7 100644
--- a/extensions/source/plugin/unx/npwrap.cxx
+++ b/extensions/source/plugin/unx/npwrap.cxx
@@ -365,12 +365,12 @@ int main( int argc, char **argv)
     if ((flags = fcntl (wakeup_fd[0], F_GETFD)) != -1)
     {
         flags |= FD_CLOEXEC;
-        fcntl (wakeup_fd[0], F_SETFD, flags);
+        (void)fcntl(wakeup_fd[0], F_SETFD, flags);
     }
     if ((flags = fcntl (wakeup_fd[1], F_GETFD)) != -1)
     {
         flags |= FD_CLOEXEC;
-        fcntl (wakeup_fd[1], F_SETFD, flags);
+        (void)fcntl(wakeup_fd[1], F_SETFD, flags);
     }
 
     // set non-blocking I/O flag.
commit 21a8b7a6fe3f198b66fd1ecc21ce7df16f4a824e
Author: Caolán McNamara <caol...@redhat.com>
Date:   Mon Oct 27 13:32:40 2014 +0000

    coverity#735348 silence Unchecked return value from library
    
    Change-Id: I6da2fccb0c709f08dc4ed321d7b16683e939cac9

diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 73e985d..3f20e19 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -79,21 +79,21 @@ SvpSalInstance::SvpSalInstance( SalYieldMutex *pMutex ) :
         if ((flags = fcntl (m_pTimeoutFDS[0], F_GETFD)) != -1)
         {
             flags |= FD_CLOEXEC;
-            (void)fcntl (m_pTimeoutFDS[0], F_SETFD, flags);
+            (void)fcntl(m_pTimeoutFDS[0], F_SETFD, flags);
         }
         if ((flags = fcntl (m_pTimeoutFDS[1], F_GETFD)) != -1)
         {
             flags |= FD_CLOEXEC;
-            (void)fcntl (m_pTimeoutFDS[1], F_SETFD, flags);
+            (void)fcntl(m_pTimeoutFDS[1], F_SETFD, flags);
         }
 
         // set non-blocking I/O flag.
-        if ((flags = fcntl (m_pTimeoutFDS[0], F_GETFL)) != -1)
+        if ((flags = fcntl(m_pTimeoutFDS[0], F_GETFL)) != -1)
         {
             flags |= O_NONBLOCK;
             (void)fcntl(m_pTimeoutFDS[0], F_SETFL, flags);
         }
-        if ((flags = fcntl (m_pTimeoutFDS[1], F_GETFL)) != -1)
+        if ((flags = fcntl(m_pTimeoutFDS[1], F_GETFL)) != -1)
         {
             flags |= O_NONBLOCK;
             (void)fcntl(m_pTimeoutFDS[1], F_SETFL, flags);
diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index 04360e2..7b10ee6 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -355,12 +355,12 @@ SalXLib::SalXLib()
         if ((flags = fcntl (m_pTimeoutFDS[0], F_GETFD)) != -1)
         {
             flags |= FD_CLOEXEC;
-            fcntl (m_pTimeoutFDS[0], F_SETFD, flags);
+            (void)fcntl(m_pTimeoutFDS[0], F_SETFD, flags);
         }
         if ((flags = fcntl (m_pTimeoutFDS[1], F_GETFD)) != -1)
         {
             flags |= FD_CLOEXEC;
-            fcntl (m_pTimeoutFDS[1], F_SETFD, flags);
+            (void)fcntl(m_pTimeoutFDS[1], F_SETFD, flags);
         }
 
         // set non-blocking I/O flag.
commit 5aee676bcce1d8b6c26d0a7420d53841f22ee17b
Author: Caolán McNamara <caol...@redhat.com>
Date:   Mon Oct 27 13:31:46 2014 +0000

    coverity#735342 silence Unchecked return value from library
    
    Change-Id: Id440d30e44aaf986532d4c6debf3876578c53b29

diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 8efbcda..73e985d 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -79,12 +79,12 @@ SvpSalInstance::SvpSalInstance( SalYieldMutex *pMutex ) :
         if ((flags = fcntl (m_pTimeoutFDS[0], F_GETFD)) != -1)
         {
             flags |= FD_CLOEXEC;
-            fcntl (m_pTimeoutFDS[0], F_SETFD, flags);
+            (void)fcntl (m_pTimeoutFDS[0], F_SETFD, flags);
         }
         if ((flags = fcntl (m_pTimeoutFDS[1], F_GETFD)) != -1)
         {
             flags |= FD_CLOEXEC;
-            fcntl (m_pTimeoutFDS[1], F_SETFD, flags);
+            (void)fcntl (m_pTimeoutFDS[1], F_SETFD, flags);
         }
 
         // set non-blocking I/O flag.
commit 6cbdfedde17c672576b5a27a9ebac1a84535dd63
Author: Caolán McNamara <caol...@redhat.com>
Date:   Mon Oct 27 13:29:54 2014 +0000

    coverity#1249674 Missing break in switch
    
    Change-Id: I1e957afe1dc35571128fac4432b54e8ae35aa9ab

diff --git a/connectivity/source/parse/sqlnode.cxx 
b/connectivity/source/parse/sqlnode.cxx
index 0c477cd..eb2abed 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -1978,6 +1978,7 @@ void OSQLParseNode::negateSearchCondition(OSQLParseNode*& 
pSearchCondition, bool
             {
             default:
                 assert(false && "OSQLParseNode::negateSearchCondition: 
unexpected node type!");
+                // fall-through
             case SQL_NODE_EQUAL:
                 pNewComparison = new 
OSQLParseNode(OUString("<>"),SQL_NODE_NOTEQUAL,SQL_NOTEQUAL);
                 break;
commit a760198deb39887bcafd5ea831e9f1992902159e
Author: Caolán McNamara <caol...@redhat.com>
Date:   Mon Oct 27 13:29:33 2014 +0000

    WaE: -Werror=sign-compare
    
    Change-Id: I3892645b52b1250be73df9359107b5bc28d2afff

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 90fcc8c..12ffe46 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -500,7 +500,7 @@ void Sttb::Print( FILE* fp )
 
     if ( cData )
     {
-        for (sal_Int32 index = 0; index < cData; ++index)
+        for (sal_uInt16 index = 0; index < cData; ++index)
         {
             if (index >= dataItems.size())
                 fprintf(fp, "   Sttb truncated at entry %d(0x%x)\n", 
static_cast< int >( index ), static_cast< unsigned int >( index ));
commit 2152628832b9ccfb09832a394bf2184f2526411f
Author: Caolán McNamara <caol...@redhat.com>
Date:   Sun Oct 26 21:19:51 2014 +0000

    see if we can auto-ignore new Sequence false positives as such
    
    Change-Id: I7099dcf15843a80c25c7fb508dd9c0e8df6447e0

diff --git a/cppu/source/uno/sequence.cxx b/cppu/source/uno/sequence.cxx
index 9523a68..1f06dd3 100644
--- a/cppu/source/uno/sequence.cxx
+++ b/cppu/source/uno/sequence.cxx
@@ -431,6 +431,8 @@ static inline bool icopyConstructFromElements(
             rtl_uString ** pDestElements = (rtl_uString **) pSeq->elements;
             for ( sal_Int32 nPos = nStartIndex; nPos < nStopIndex; ++nPos )
             {
+                // https://communities.coverity.com/thread/2993
+                /* coverity[overrun-buffer-arg] */
                 ::rtl_uString_acquire(
                     ((rtl_uString **)pSourceElements)[nPos] );
                 pDestElements[nPos] = ((rtl_uString **)pSourceElements)[nPos];
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to