[Libreoffice-commits] core.git: 7 commits - bridges/source compilerplugins/clang connectivity/source

Michael Stahl mstahl at redhat.com
Tue Jun 21 16:24:03 UTC 2016


 bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx |    1 
 bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx           |   39 +++++-----
 bridges/source/cpp_uno/gcc3_linux_intel/except.cxx            |   14 +--
 bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx           |   37 ++++-----
 compilerplugins/clang/reservedid.cxx                          |    7 -
 connectivity/source/drivers/firebird/Blob.cxx                 |    8 ++
 connectivity/source/drivers/firebird/Connection.cxx           |    7 +
 connectivity/source/drivers/firebird/PreparedStatement.cxx    |    8 ++
 connectivity/source/drivers/firebird/StatementCommonBase.cxx  |    6 +
 9 files changed, 77 insertions(+), 50 deletions(-)

New commits:
commit 3fecccad4ab76bd005de8dd541da02b67b08e266
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jun 20 20:51:14 2016 +0200

    connecitivty: [loplugin:nullptr]
    
    Change-Id: Ic717e1d119e1a5b8a87caca263322d9e58fe6c68

diff --git a/connectivity/source/drivers/firebird/Blob.cxx b/connectivity/source/drivers/firebird/Blob.cxx
index 922887d..7a7481b 100644
--- a/connectivity/source/drivers/firebird/Blob.cxx
+++ b/connectivity/source/drivers/firebird/Blob.cxx
@@ -33,7 +33,11 @@ Blob::Blob(isc_db_handle* pDatabaseHandle,
     m_pDatabaseHandle(pDatabaseHandle),
     m_pTransactionHandle(pTransactionHandle),
     m_blobID(aBlobID),
+#if SAL_TYPES_SIZEOFPOINTER == 8
     m_blobHandle(0),
+#else
+    m_blobHandle(nullptr),
+#endif
     m_bBlobOpened(false),
     m_nBlobLength(0),
     m_nBlobPosition(0)
@@ -103,7 +107,11 @@ void Blob::closeBlob()
             evaluateStatusVector(m_statusVector, "isc_close_blob", *this);
 
         m_bBlobOpened = false;
+#if SAL_TYPES_SIZEOFPOINTER == 8
         m_blobHandle = 0;
+#else
+        m_blobHandle = nullptr;
+#endif
     }
 }
 
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx
index 979c677..61e9836 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -89,8 +89,13 @@ Connection::Connection(FirebirdDriver*    _pDriver)
     , m_bIsAutoCommit(false)
     , m_bIsReadOnly(false)
     , m_aTransactionIsolation(TransactionIsolation::REPEATABLE_READ)
+#if SAL_TYPES_SIZEOFPOINTER == 8
     , m_aDBHandle(0)
     , m_aTransactionHandle(0)
+#else
+    , m_aDBHandle(nullptr)
+    , m_aTransactionHandle(nullptr)
+#endif
     , m_xCatalog(nullptr)
     , m_xMetaData(nullptr)
     , m_aStatements()
@@ -773,7 +778,7 @@ void Connection::disposing()
         isc_rollback_transaction(status, &m_aTransactionHandle);
     }
 
-    if (m_aDBHandle != 0)
+    if (m_aDBHandle)
     {
         if (isc_detach_database(status, &m_aDBHandle))
         {
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index bce48fb3..007714d 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -485,7 +485,11 @@ void SAL_CALL OPreparedStatement::setBlob(sal_Int32 nParameterIndex,
     ::osl::MutexGuard aGuard(m_aMutex);
     checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
 
+#if SAL_TYPES_SIZEOFPOINTER == 8
     isc_blob_handle aBlobHandle = 0;
+#else
+    isc_blob_handle aBlobHandle = nullptr;
+#endif
     ISC_QUAD aBlobId;
 
     openBlobForWriting(aBlobHandle, aBlobId);
@@ -585,7 +589,11 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex,
     ::osl::MutexGuard aGuard(m_aMutex);
     checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
 
+#if SAL_TYPES_SIZEOFPOINTER == 8
     isc_blob_handle aBlobHandle = 0;
+#else
+    isc_blob_handle aBlobHandle = nullptr;
+#endif
     ISC_QUAD aBlobId;
 
     openBlobForWriting(aBlobHandle, aBlobId);
diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.cxx b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
index d1208e8..bd1c4b7 100644
--- a/connectivity/source/drivers/firebird/StatementCommonBase.cxx
+++ b/connectivity/source/drivers/firebird/StatementCommonBase.cxx
@@ -47,7 +47,11 @@ OStatementCommonBase::OStatementCommonBase(Connection* _pConnection)
     : OStatementCommonBase_Base(m_aMutex),
       OPropertySetHelper(OStatementCommonBase_Base::rBHelper),
       m_pConnection(_pConnection),
-      m_aStatementHandle( 0 )
+#if SAL_TYPES_SIZEOFPOINTER == 8
+      m_aStatementHandle(0)
+#else
+      m_aStatementHandle(nullptr)
+#endif
 {
 }
 
commit 8ad0fb82d41822aedaa3bef8f6602bd9763c97b8
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jun 20 14:56:59 2016 +0200

    bridges: [loplugin:staticanonymous]
    
    Change-Id: I9d2c233c7060ea5c7a6bc028a8146ee8b2fd555b

diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
index 9365f84..579a101 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
@@ -37,7 +37,7 @@ using namespace ::com::sun::star::uno;
 namespace
 {
 
-static void cpp_call(
+void cpp_call(
     bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
     bridges::cpp_uno::shared::VtableSlot aVtableSlot,
     typelib_TypeDescriptionReference * pReturnTypeRef,
commit 67f3a9a48f17b09b9e56c50080040ee73f3f4ec2
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jun 20 14:56:16 2016 +0200

    bridges: [loplugin:nullptr]
    
    Change-Id: I7386569030fc95553bfb423d23d291430388992b

diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
index e272f41..f888ab4 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
@@ -49,12 +49,12 @@ void cpp2uno_call(
     char * pCppStack = reinterpret_cast<char *>(pCallStack +1);
 
     // return
-    typelib_TypeDescription * pReturnTypeDescr = 0;
+    typelib_TypeDescription * pReturnTypeDescr = nullptr;
     if (pReturnTypeRef)
         TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
 
-    void * pUnoReturn = 0;
-    void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
+    void * pUnoReturn = nullptr;
+    void * pCppReturn = nullptr; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
 
     if (pReturnTypeDescr)
     {
@@ -91,7 +91,7 @@ void cpp2uno_call(
     for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
     {
         const typelib_MethodParameter & rParam = pParams[nPos];
-        typelib_TypeDescription * pParamTypeDescr = 0;
+        typelib_TypeDescription * pParamTypeDescr = nullptr;
         TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
 
         if (!rParam.bOut
@@ -163,7 +163,7 @@ void cpp2uno_call(
             sal_Int32 nIndex = pTempIndices[nTempIndices];
 
             if (pParams[nIndex].bIn) // is in/inout => was constructed
-                uno_destructData( pUnoArgs[nIndex], ppTempParamTypeDescr[nTempIndices], 0 );
+                uno_destructData( pUnoArgs[nIndex], ppTempParamTypeDescr[nTempIndices], nullptr );
             TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndices] );
         }
         if (pReturnTypeDescr)
@@ -189,7 +189,7 @@ void cpp2uno_call(
                                         pThis->getBridge()->getUno2Cpp() );
             }
             // destroy temp uno param
-            uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
+            uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, nullptr );
 
             TYPELIB_DANGER_RELEASE( pParamTypeDescr );
         }
@@ -201,7 +201,7 @@ void cpp2uno_call(
                 uno_copyAndConvertData( pCppReturn, pUnoReturn, pReturnTypeDescr,
                                         pThis->getBridge()->getUno2Cpp() );
                 // destroy temp uno return
-                uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
+                uno_destructData( pUnoReturn, pReturnTypeDescr, nullptr );
             }
             // complex return ptr is set to eax
             *static_cast< void ** >(pReturnValue) = pCppReturn;
@@ -268,7 +268,7 @@ extern "C" void cpp_vtable_call(
             cpp2uno_call(
                 pCppI, aMemberDescr.get(),
                 reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>(aMemberDescr.get())->pAttributeTypeRef,
-                0, 0, // no params
+                0, nullptr, // no params
                 pCallStack, pReturnValue );
         }
         else
@@ -282,7 +282,7 @@ extern "C" void cpp_vtable_call(
 
             cpp2uno_call(
                 pCppI, aMemberDescr.get(),
-                0, // indicates void return
+                nullptr, // indicates void return
                 1, &aParam,
                 pCallStack, pReturnValue );
         }
@@ -301,11 +301,11 @@ extern "C" void cpp_vtable_call(
             break;
         case 0: // queryInterface() opt
         {
-            typelib_TypeDescription * pTD = 0;
+            typelib_TypeDescription * pTD = nullptr;
             TYPELIB_DANGER_GET( &pTD, static_cast< Type * >( pCallStack[3] )->getTypeLibType() );
             if (pTD)
             {
-                XInterface * pInterface = 0;
+                XInterface * pInterface = nullptr;
                 (*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
                     pCppI->getBridge()->getCppEnv(),
                     reinterpret_cast<void **>(&pInterface), pCppI->getOid().pData,
@@ -457,8 +457,8 @@ bridges::cpp_uno::shared::VtableFactory::initializeBlock(
     typelib_InterfaceTypeDescription *)
 {
     Slot * slots = mapBlockToVtable(block);
-    slots[-2].fn = 0;
-    slots[-1].fn = 0;
+    slots[-2].fn = nullptr;
+    slots[-1].fn = nullptr;
     return slots + slotCount;
 }
 
@@ -470,9 +470,9 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
     (*slots) -= functionCount;
     Slot * s = *slots;
     for (sal_Int32 i = 0; i < type->nMembers; ++i) {
-        typelib_TypeDescription * member = 0;
+        typelib_TypeDescription * member = nullptr;
         TYPELIB_DANGER_GET(&member, type->ppMembers[i]);
-        assert(member != 0);
+        assert(member != nullptr);
         switch (member->eTypeClass) {
         case typelib_TypeClass_INTERFACE_ATTRIBUTE:
             // Getter:
@@ -489,7 +489,7 @@ unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
                 (s++)->fn = code + writetoexecdiff;
                 code = codeSnippet(
                     code, writetoexecdiff, functionOffset++, vtableOffset,
-                    NULL);
+                    nullptr);
             }
             break;
 
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
index feaa394..4c5105d 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/except.cxx
@@ -100,7 +100,7 @@ public:
 };
 
 RTTI::RTTI()
-    : m_hApp( dlopen( 0, RTLD_LAZY ) )
+    : m_hApp( dlopen(nullptr, RTLD_LAZY) )
 {
 }
 
@@ -193,7 +193,7 @@ extern "C" {
 static void _GLIBCXX_CDTOR_CALLABI deleteException( void * pExc )
 {
     __cxa_exception const * header = static_cast<__cxa_exception const *>(pExc) - 1;
-    typelib_TypeDescription * pTD = 0;
+    typelib_TypeDescription * pTD = nullptr;
     OUString unoName( toUNOname( header->exceptionType->name() ) );
     ::typelib_typedescription_getByName( &pTD, unoName.pData );
     assert(pTD && "### unknown exception type! leaving out destruction => leaking!!!");
@@ -219,7 +219,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
 
     {
     // construct cpp exception object
-    typelib_TypeDescription * pTypeDescr = 0;
+    typelib_TypeDescription * pTypeDescr = nullptr;
     TYPELIB_DANGER_GET( &pTypeDescr, pUnoExc->pType );
     assert(pTypeDescr);
     if (! pTypeDescr)
@@ -233,9 +233,9 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
     ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp );
 
     // destruct uno exception
-    ::uno_any_destruct( pUnoExc, 0 );
+    ::uno_any_destruct( pUnoExc, nullptr );
     // avoiding locked counts
-    static RTTI * s_rtti = 0;
+    static RTTI * s_rtti = nullptr;
     if (! s_rtti)
     {
         MutexGuard guard( Mutex::getGlobalMutex() );
@@ -274,14 +274,14 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
         return;
     }
 
-    typelib_TypeDescription * pExcTypeDescr = 0;
+    typelib_TypeDescription * pExcTypeDescr = nullptr;
     OUString unoName( toUNOname( header->exceptionType->name() ) );
 #if OSL_DEBUG_LEVEL > 1
     OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
     fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() );
 #endif
     typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
-    if (0 == pExcTypeDescr)
+    if (nullptr == pExcTypeDescr)
     {
         RuntimeException aRE( "exception type not found: " + unoName );
         Type const & rType = cppu::UnoType<decltype(aRE)>::get();
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
index d69e252..9365f84 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
@@ -50,11 +50,11 @@ static void cpp_call(
       char * pCppStackStart = pCppStack;
 
     // return
-    typelib_TypeDescription * pReturnTypeDescr = 0;
+    typelib_TypeDescription * pReturnTypeDescr = nullptr;
     TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
     assert(pReturnTypeDescr);
 
-    void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
+    void * pCppReturn = nullptr; // if != 0 && != pUnoReturn, needs reconversion
     bool bSimpleReturn = true;
 
     if (pReturnTypeDescr)
@@ -95,7 +95,7 @@ static void cpp_call(
     for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
     {
         const typelib_MethodParameter & rParam = pParams[nPos];
-        typelib_TypeDescription * pParamTypeDescr = 0;
+        typelib_TypeDescription * pParamTypeDescr = nullptr;
         TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
 
         if (!rParam.bOut
@@ -160,7 +160,7 @@ static void cpp_call(
             pCppReturn, pReturnTypeDescr, bSimpleReturn,
             reinterpret_cast<sal_Int32 *>(pCppStackStart), (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
         // NO exception occurred...
-        *ppUnoExc = 0;
+        *ppUnoExc = nullptr;
 
         // reconvert temporary params
         for ( ; nTempIndices--; )
@@ -172,7 +172,7 @@ static void cpp_call(
             {
                 if (pParams[nIndex].bOut) // inout
                 {
-                    uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 ); // destroy uno value
+                    uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, nullptr ); // destroy uno value
                     uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
                                             pThis->getBridge()->getCpp2Uno() );
                 }
@@ -277,7 +277,7 @@ void unoInterfaceProxyDispatch(
             cpp_call(
                 pThis, aVtableSlot,
                 reinterpret_cast<typelib_InterfaceAttributeTypeDescription const *>(pMemberDescr)->pAttributeTypeRef,
-                0, 0, // no params
+                0, nullptr, // no params
                 pReturn, pArgs, ppException );
         }
         else
@@ -289,7 +289,7 @@ void unoInterfaceProxyDispatch(
             aParam.bIn      = true;
             aParam.bOut     = false;
 
-            typelib_TypeDescriptionReference * pReturnTypeRef = 0;
+            typelib_TypeDescriptionReference * pReturnTypeRef = nullptr;
             OUString aVoidName("void");
             typelib_typedescriptionreference_new(
                 &pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
@@ -319,19 +319,19 @@ void unoInterfaceProxyDispatch(
             // standard calls
         case 1: // acquire uno interface
             (*pUnoI->acquire)( pUnoI );
-            *ppException = 0;
+            *ppException = nullptr;
             break;
         case 2: // release uno interface
             (*pUnoI->release)( pUnoI );
-            *ppException = 0;
+            *ppException = nullptr;
             break;
         case 0: // queryInterface() opt
         {
-            typelib_TypeDescription * pTD = 0;
+            typelib_TypeDescription * pTD = nullptr;
             TYPELIB_DANGER_GET( &pTD, static_cast< Type * >( pArgs[0] )->getTypeLibType() );
             if (pTD)
             {
-                uno_Interface * pInterface = 0;
+                uno_Interface * pInterface = nullptr;
                 (*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
                     pThis->pBridge->getUnoEnv(),
                     reinterpret_cast<void **>(&pInterface), pThis->oid.pData, reinterpret_cast<typelib_InterfaceTypeDescription *>(pTD) );
@@ -340,10 +340,10 @@ void unoInterfaceProxyDispatch(
                 {
                     ::uno_any_construct(
                         static_cast< uno_Any * >( pReturn ),
-                        &pInterface, pTD, 0 );
+                        &pInterface, pTD, nullptr );
                     (*pInterface->release)( pInterface );
                     TYPELIB_DANGER_RELEASE( pTD );
-                    *ppException = 0;
+                    *ppException = nullptr;
                     break;
                 }
                 TYPELIB_DANGER_RELEASE( pTD );
@@ -369,7 +369,7 @@ void unoInterfaceProxyDispatch(
 
         Type const & rExcType = cppu::UnoType<decltype(aExc)>::get();
         // binary identical null reference
-        ::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
+        ::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), nullptr );
     }
     }
 }
commit 371ddde018459143e4b3598a68c3786f46d989fd
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jun 20 14:47:56 2016 +0200

    bridges: [loplugin:salbool]
    
    Change-Id: I1924f2b18763e42013c2b5ce80b664674e460fc7

diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
index a440fc4..e272f41 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
@@ -277,8 +277,8 @@ extern "C" void cpp_vtable_call(
             typelib_MethodParameter aParam;
             aParam.pTypeRef =
                 reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>(aMemberDescr.get())->pAttributeTypeRef;
-            aParam.bIn      = sal_True;
-            aParam.bOut     = sal_False;
+            aParam.bIn      = true;
+            aParam.bOut     = false;
 
             cpp2uno_call(
                 pCppI, aMemberDescr.get(),
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
index c2d0363..d69e252 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
@@ -286,8 +286,8 @@ void unoInterfaceProxyDispatch(
             typelib_MethodParameter aParam;
             aParam.pTypeRef =
                 reinterpret_cast<typelib_InterfaceAttributeTypeDescription const *>(pMemberDescr)->pAttributeTypeRef;
-            aParam.bIn      = sal_True;
-            aParam.bOut     = sal_False;
+            aParam.bIn      = true;
+            aParam.bOut     = false;
 
             typelib_TypeDescriptionReference * pReturnTypeRef = 0;
             OUString aVoidName("void");
commit bd8c0293010a767a9889cf1b5e92e4828b6b07bd
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jun 20 14:43:14 2016 +0200

    compilerplugins: ignore GCC bridges more generically
    
    Change-Id: Ib76b14d37bbe3c32aa0637037d73d0d5dce01b25

diff --git a/compilerplugins/clang/reservedid.cxx b/compilerplugins/clang/reservedid.cxx
index c2523c8..2206257 100644
--- a/compilerplugins/clang/reservedid.cxx
+++ b/compilerplugins/clang/reservedid.cxx
@@ -103,10 +103,8 @@ bool ReservedId::VisitNamedDecl(NamedDecl const * decl) {
         return true;
     }
     auto filename = compiler.getSourceManager().getFilename(spelLoc);
-    if ((filename
-         == SRCDIR "/bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx")
-        || (filename
-            == SRCDIR "/bridges/source/cpp_uno/gcc3_macosx_x86-64/share.hxx"))
+    if (filename.startswith(SRCDIR "/bridges/source/cpp_uno/")
+        && filename.endswith("share.hxx"))
     {
         return true;
     }
commit d7777467a3a06bc367d0f9aa1bbf9e361609da7d
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jun 20 14:37:23 2016 +0200

    bridges: -Werror,-Wimplicit-fallthrough
    
    Change-Id: I1ad51d4dc7e6bddfc5fa8d6252a7d6349bd5dfb7

diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx
index 94d94d8..4fe126c 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/callvirtualmethod.cxx
@@ -107,6 +107,7 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
         case typelib_TypeClass_HYPER:
         case typelib_TypeClass_UNSIGNED_HYPER:
             static_cast<long*>(pRegisterReturn)[1] = edx;
+            SAL_FALLTHROUGH;
         case typelib_TypeClass_LONG:
         case typelib_TypeClass_UNSIGNED_LONG:
         case typelib_TypeClass_CHAR:
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
index fcbe630..a440fc4 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx
@@ -323,7 +323,8 @@ extern "C" void cpp_vtable_call(
                 }
                 TYPELIB_DANGER_RELEASE( pTD );
             }
-        } // else perform queryInterface()
+            SAL_FALLTHROUGH; // else perform queryInterface()
+        }
         default:
             cpp2uno_call(
                 pCppI, aMemberDescr.get(),
diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
index d7679ea..c2d0363 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx
@@ -348,7 +348,8 @@ void unoInterfaceProxyDispatch(
                 }
                 TYPELIB_DANGER_RELEASE( pTD );
             }
-        } // else perform queryInterface()
+            SAL_FALLTHROUGH; // else perform queryInterface()
+        }
         default:
             // dependent dispatch
             cpp_call(
commit 633e6cf96e9d5a23f5204ca7c02ee4cfa0215f46
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jun 20 14:32:39 2016 +0200

    compilerplugins: don't warn about __lxstat64
    
    Change-Id: I71e21d6aff55caa1bc3e8e25f0b4c60386120d00

diff --git a/compilerplugins/clang/reservedid.cxx b/compilerplugins/clang/reservedid.cxx
index 6269b9b..c2523c8 100644
--- a/compilerplugins/clang/reservedid.cxx
+++ b/compilerplugins/clang/reservedid.cxx
@@ -132,6 +132,7 @@ bool ReservedId::VisitNamedDecl(NamedDecl const * decl) {
             && s != "__PK11_GetKeyData"
                 // xmlsecurity/source/xmlsec/nss/nssrenam.h
             && s != "__data_start" // sal/osl/unx/system.cxx
+            && s != "__lxstat64" // setup_native/scripts/source/getuid.c
             && s != "__lxstat") // setup_native/scripts/source/getuid.c
         {
             report(


More information about the Libreoffice-commits mailing list