Kaydet (Commit) 05bca569 authored tarafından Rohan Kumar's avatar Rohan Kumar Kaydeden (comit) Stephan Bergmann

tdf#91794: Remove OSL_DEBUG_LEVEL > 1 conditionals

Updates pointed by sberg

Change-Id: Ie12548dfa9ad3a6836efbfe64153bc075f138fc6
Reviewed-on: https://gerrit.libreoffice.org/22622Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
Tested-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst b38f58a3
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <cstdlib> #include <cstdlib>
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <uno/threadpool.h> #include <uno/threadpool.h>
#include <sal/log.hxx>
#include "thread.hxx" #include "thread.hxx"
#include "jobqueue.hxx" #include "jobqueue.hxx"
...@@ -38,12 +39,7 @@ namespace cppu_threadpool { ...@@ -38,12 +39,7 @@ namespace cppu_threadpool {
ThreadAdmin::~ThreadAdmin() ThreadAdmin::~ThreadAdmin()
{ {
#if OSL_DEBUG_LEVEL > 1 SAL_WARN_IF(m_lst.size(), "cppu.threadpool", m_lst.size() << "Threads left");
if( m_lst.size() )
{
fprintf( stderr, "%lu Threads left\n" , static_cast<unsigned long>(m_lst.size()) );
}
#endif
} }
bool ThreadAdmin::add( rtl::Reference< ORequestThread > const & p ) bool ThreadAdmin::add( rtl::Reference< ORequestThread > const & p )
......
...@@ -18,10 +18,6 @@ ...@@ -18,10 +18,6 @@
*/ */
#if OSL_DEBUG_LEVEL > 1
#include <stdio.h>
#endif
#include <unordered_map> #include <unordered_map>
#include <cassert> #include <cassert>
#include <list> #include <list>
...@@ -188,7 +184,7 @@ struct TypeDescriptor_Init_Impl ...@@ -188,7 +184,7 @@ struct TypeDescriptor_Init_Impl
inline void callChain( typelib_TypeDescription ** ppRet, rtl_uString * pName ); inline void callChain( typelib_TypeDescription ** ppRet, rtl_uString * pName );
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
// only for debugging // only for debugging
sal_Int32 nTypeDescriptionCount; sal_Int32 nTypeDescriptionCount;
sal_Int32 nCompoundTypeDescriptionCount; sal_Int32 nCompoundTypeDescriptionCount;
...@@ -202,7 +198,7 @@ struct TypeDescriptor_Init_Impl ...@@ -202,7 +198,7 @@ struct TypeDescriptor_Init_Impl
TypeDescriptor_Init_Impl(): TypeDescriptor_Init_Impl():
pWeakMap(nullptr), pCallbacks(nullptr), pCache(nullptr), pMutex(nullptr) pWeakMap(nullptr), pCallbacks(nullptr), pCache(nullptr), pMutex(nullptr)
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
, nTypeDescriptionCount(0), nCompoundTypeDescriptionCount(0), , nTypeDescriptionCount(0), nCompoundTypeDescriptionCount(0),
nIndirectTypeDescriptionCount(0), nIndirectTypeDescriptionCount(0),
nEnumTypeDescriptionCount(0), nEnumTypeDescriptionCount(0),
...@@ -290,41 +286,38 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() ...@@ -290,41 +286,38 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl()
typelib_typedescriptionreference_release( pTDR ); typelib_typedescriptionreference_release( pTDR );
} }
#if OSL_DEBUG_LEVEL > 1
aIt = pWeakMap->begin(); aIt = pWeakMap->begin();
#if defined SAL_LOG_INFO
while( aIt != pWeakMap->end() ) while( aIt != pWeakMap->end() )
{ {
typelib_TypeDescriptionReference * pTDR = (*aIt).second; typelib_TypeDescriptionReference * pTDR = (*aIt).second;
if (pTDR) if (pTDR)
{ {
OString aTypeName( rtl::OUStringToOString( pTDR->pTypeName, RTL_TEXTENCODING_ASCII_US ) ); OString aTypeName( rtl::OUStringToOString( pTDR->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
OSL_TRACE( SAL_INFO("cppu.typelib", "remaining type: " << aTypeName << "; ref count = " << pTDR->nRefCount);
"### remaining type: %s; ref count = %d", aTypeName.getStr(), pTDR->nRefCount );
} }
else else
{ {
OSL_TRACE( "### remaining null type entry!?" ); SAL_INFO("cppu.typelib", "remaining null type entry!?");
} }
++aIt; ++aIt;
} }
#endif #endif
delete pWeakMap; delete pWeakMap;
pWeakMap = nullptr; pWeakMap = nullptr;
} }
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
OSL_ENSURE( !nTypeDescriptionCount, "### nTypeDescriptionCount is not zero" ); SAL_WARN_IF( (!nTypeDescriptionCount), "cppu.typelib", "nTypeDescriptionCount is not zero" );
OSL_ENSURE( !nCompoundTypeDescriptionCount, "### nCompoundTypeDescriptionCount is not zero" ); SAL_WARN_IF( (!nCompoundTypeDescriptionCount), "cppu.typelib", "nCompoundTypeDescriptionCount is not zero" );
OSL_ENSURE( !nIndirectTypeDescriptionCount, "### nIndirectTypeDescriptionCount is not zero" ); SAL_WARN_IF( (!nIndirectTypeDescriptionCount), "cppu.typelib", "nIndirectTypeDescriptionCount is not zero" );
OSL_ENSURE( !nEnumTypeDescriptionCount, "### nEnumTypeDescriptionCount is not zero" ); SAL_WARN_IF( (!nEnumTypeDescriptionCount), "cppu.typelib", "nEnumTypeDescriptionCount is not zero" );
OSL_ENSURE( !nInterfaceMethodTypeDescriptionCount, "### nInterfaceMethodTypeDescriptionCount is not zero" ); SAL_WARN_IF( (!nInterfaceMethodTypeDescriptionCount), "cppu.typelib", "nInterfaceMethodTypeDescriptionCount is not zero" );
OSL_ENSURE( !nInterfaceAttributeTypeDescriptionCount, "### nInterfaceAttributeTypeDescriptionCount is not zero" ); SAL_WARN_IF( (!nInterfaceAttributeTypeDescriptionCount), "cppu.typelib", "nInterfaceAttributeTypeDescriptionCount is not zero" );
OSL_ENSURE( !nInterfaceTypeDescriptionCount, "### nInterfaceTypeDescriptionCount is not zero" ); SAL_WARN_IF( (!nInterfaceTypeDescriptionCount), "cppu.typelib", "nInterfaceTypeDescriptionCount is not zero" );
OSL_ENSURE( !nTypeDescriptionReferenceCount, "### nTypeDescriptionReferenceCount is not zero" ); SAL_WARN_IF( (!nTypeDescriptionReferenceCount), "cppu.typelib", "nTypeDescriptionReferenceCount is not zero" );
OSL_ENSURE( !pCallbacks || pCallbacks->empty(), "### pCallbacks is not NULL or empty" );
#endif #endif
SAL_WARN_IF( (!pCallbacks || pCallbacks->empty()), "cppu.typelib", "pCallbacks is not NULL or empty" );
delete pCallbacks; delete pCallbacks;
pCallbacks = nullptr; pCallbacks = nullptr;
...@@ -395,13 +388,10 @@ static inline void typelib_typedescription_initTables( ...@@ -395,13 +388,10 @@ static inline void typelib_typedescription_initTables(
aReadWriteAttributes[i] = !reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>(pM)->bReadOnly; aReadWriteAttributes[i] = !reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>(pM)->bReadOnly;
TYPELIB_DANGER_RELEASE( pM ); TYPELIB_DANGER_RELEASE( pM );
} }
#if OSL_DEBUG_LEVEL > 1
else else
{ {
OString aStr( rtl::OUStringToOString( pITD->ppAllMembers[i]->pTypeName, RTL_TEXTENCODING_ASCII_US ) ); SAL_INFO( "cppu.typelib", "cannot get attribute type description: " << pITD->ppAllMembers[i]->pTypeName );
OSL_TRACE( "\n### cannot get attribute type description: %s", aStr.getStr() );
} }
#endif
} }
} }
...@@ -541,11 +531,9 @@ bool complete(typelib_TypeDescription ** ppTypeDescr, bool initTables) { ...@@ -541,11 +531,9 @@ bool complete(typelib_TypeDescription ** ppTypeDescr, bool initTables) {
} }
else else
{ {
#if OSL_DEBUG_LEVEL > 1
OString aStr( OString aStr(
rtl::OUStringToOString( (*ppTypeDescr)->pTypeName, RTL_TEXTENCODING_ASCII_US ) ); rtl::OUStringToOString( (*ppTypeDescr)->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
OSL_TRACE( "\n### type cannot be completed: %s", aStr.getStr() ); SAL_INFO( "cppu.typelib", "type cannot be completed: " << aStr.getStr() );
#endif
return false; return false;
} }
} }
...@@ -575,7 +563,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty( ...@@ -575,7 +563,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
{ {
auto pTmp = allocTypeDescription<typelib_IndirectTypeDescription>(); auto pTmp = allocTypeDescription<typelib_IndirectTypeDescription>();
pRet = &pTmp->aBase; pRet = &pTmp->aBase;
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &Init::get().nIndirectTypeDescriptionCount ); osl_atomic_increment( &Init::get().nIndirectTypeDescriptionCount );
#endif #endif
pTmp->pType = nullptr; pTmp->pType = nullptr;
...@@ -587,7 +575,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty( ...@@ -587,7 +575,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
// FEATURE_EMPTYCLASS // FEATURE_EMPTYCLASS
auto pTmp = allocTypeDescription<typelib_StructTypeDescription>(); auto pTmp = allocTypeDescription<typelib_StructTypeDescription>();
pRet = &pTmp->aBase.aBase; pRet = &pTmp->aBase.aBase;
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &Init::get().nCompoundTypeDescriptionCount ); osl_atomic_increment( &Init::get().nCompoundTypeDescriptionCount );
#endif #endif
pTmp->aBase.pBaseTypeDescription = nullptr; pTmp->aBase.pBaseTypeDescription = nullptr;
...@@ -604,7 +592,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty( ...@@ -604,7 +592,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
// FEATURE_EMPTYCLASS // FEATURE_EMPTYCLASS
auto pTmp = allocTypeDescription<typelib_CompoundTypeDescription>(); auto pTmp = allocTypeDescription<typelib_CompoundTypeDescription>();
pRet = &pTmp->aBase; pRet = &pTmp->aBase;
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &Init::get().nCompoundTypeDescriptionCount ); osl_atomic_increment( &Init::get().nCompoundTypeDescriptionCount );
#endif #endif
pTmp->pBaseTypeDescription = nullptr; pTmp->pBaseTypeDescription = nullptr;
...@@ -619,7 +607,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty( ...@@ -619,7 +607,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
{ {
auto pTmp = allocTypeDescription<typelib_EnumTypeDescription>(); auto pTmp = allocTypeDescription<typelib_EnumTypeDescription>();
pRet = &pTmp->aBase; pRet = &pTmp->aBase;
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &Init::get().nEnumTypeDescriptionCount ); osl_atomic_increment( &Init::get().nEnumTypeDescriptionCount );
#endif #endif
pTmp->nDefaultEnumValue = 0; pTmp->nDefaultEnumValue = 0;
...@@ -634,7 +622,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty( ...@@ -634,7 +622,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
auto pTmp = allocTypeDescription< auto pTmp = allocTypeDescription<
typelib_InterfaceTypeDescription>(); typelib_InterfaceTypeDescription>();
pRet = &pTmp->aBase; pRet = &pTmp->aBase;
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &Init::get().nInterfaceTypeDescriptionCount ); osl_atomic_increment( &Init::get().nInterfaceTypeDescriptionCount );
#endif #endif
pTmp->pBaseTypeDescription = nullptr; pTmp->pBaseTypeDescription = nullptr;
...@@ -655,7 +643,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty( ...@@ -655,7 +643,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
auto pTmp = allocTypeDescription< auto pTmp = allocTypeDescription<
typelib_InterfaceMethodTypeDescription>(); typelib_InterfaceMethodTypeDescription>();
pRet = &pTmp->aBase.aBase; pRet = &pTmp->aBase.aBase;
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &Init::get().nInterfaceMethodTypeDescriptionCount ); osl_atomic_increment( &Init::get().nInterfaceMethodTypeDescriptionCount );
#endif #endif
pTmp->aBase.pMemberName = nullptr; pTmp->aBase.pMemberName = nullptr;
...@@ -675,7 +663,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty( ...@@ -675,7 +663,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
auto * pTmp = allocTypeDescription< auto * pTmp = allocTypeDescription<
typelib_InterfaceAttributeTypeDescription>(); typelib_InterfaceAttributeTypeDescription>();
pRet = &pTmp->aBase.aBase; pRet = &pTmp->aBase.aBase;
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &Init::get().nInterfaceAttributeTypeDescriptionCount ); osl_atomic_increment( &Init::get().nInterfaceAttributeTypeDescriptionCount );
#endif #endif
pTmp->aBase.pMemberName = nullptr; pTmp->aBase.pMemberName = nullptr;
...@@ -693,7 +681,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty( ...@@ -693,7 +681,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
default: default:
{ {
pRet = allocTypeDescription<typelib_TypeDescription>(); pRet = allocTypeDescription<typelib_TypeDescription>();
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &Init::get().nTypeDescriptionCount ); osl_atomic_increment( &Init::get().nTypeDescriptionCount );
#endif #endif
} }
...@@ -1438,7 +1426,7 @@ extern "C" void SAL_CALL typelib_typedescription_release( ...@@ -1438,7 +1426,7 @@ extern "C" void SAL_CALL typelib_typedescription_release(
typelib_typedescription_destructExtendedMembers( pTD ); typelib_typedescription_destructExtendedMembers( pTD );
rtl_uString_release( pTD->pTypeName ); rtl_uString_release( pTD->pTypeName );
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
switch( pTD->eTypeClass ) switch( pTD->eTypeClass )
{ {
case typelib_TypeClass_SEQUENCE: case typelib_TypeClass_SEQUENCE:
...@@ -2117,10 +2105,7 @@ extern "C" void SAL_CALL typelib_typedescriptionreference_new( ...@@ -2117,10 +2105,7 @@ extern "C" void SAL_CALL typelib_typedescriptionreference_new(
} }
else if (*ppTDR) else if (*ppTDR)
{ {
#if OSL_DEBUG_LEVEL > 1 SAL_INFO("cppu.typelib", "typedef not found : " << pTypeName);
OString aStr( rtl::OUStringToOString( pTypeName, RTL_TEXTENCODING_ASCII_US ) );
OSL_ENSURE( !"### typedef not found: ", aStr.getStr() );
#endif
typelib_typedescriptionreference_release( *ppTDR ); typelib_typedescriptionreference_release( *ppTDR );
*ppTDR = nullptr; *ppTDR = nullptr;
} }
...@@ -2135,7 +2120,7 @@ extern "C" void SAL_CALL typelib_typedescriptionreference_new( ...@@ -2135,7 +2120,7 @@ extern "C" void SAL_CALL typelib_typedescriptionreference_new(
if( reallyWeak( eTypeClass ) ) if( reallyWeak( eTypeClass ) )
{ {
typelib_TypeDescriptionReference * pTDR = new typelib_TypeDescriptionReference(); typelib_TypeDescriptionReference * pTDR = new typelib_TypeDescriptionReference();
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &rInit.nTypeDescriptionReferenceCount ); osl_atomic_increment( &rInit.nTypeDescriptionReferenceCount );
#endif #endif
pTDR->nRefCount = 1; pTDR->nRefCount = 1;
...@@ -2194,7 +2179,7 @@ extern "C" void SAL_CALL typelib_typedescriptionreference_release( ...@@ -2194,7 +2179,7 @@ extern "C" void SAL_CALL typelib_typedescriptionreference_release(
rtl_uString_release( pRef->pTypeName ); rtl_uString_release( pRef->pTypeName );
OSL_ASSERT( pRef->pType == nullptr ); OSL_ASSERT( pRef->pType == nullptr );
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
osl_atomic_decrement( &rInit.nTypeDescriptionReferenceCount ); osl_atomic_decrement( &rInit.nTypeDescriptionReferenceCount );
#endif #endif
delete pRef; delete pRef;
......
...@@ -321,8 +321,7 @@ sal_Bool SAL_CALL uno_type_isAssignableFromData( ...@@ -321,8 +321,7 @@ sal_Bool SAL_CALL uno_type_isAssignableFromData(
} }
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 0
namespace cppu { namespace cppu {
#if defined( SAL_W32) #if defined( SAL_W32)
...@@ -343,13 +342,6 @@ namespace cppu { ...@@ -343,13 +342,6 @@ namespace cppu {
#define OFFSET_OF( s, m ) reinterpret_cast< size_t >((char *)&((s *)16)->m -16) #define OFFSET_OF( s, m ) reinterpret_cast< size_t >((char *)&((s *)16)->m -16)
#define BINTEST_VERIFY( c ) \
if (! (c)) \
{ \
fprintf( stderr, "### binary compatibility test failed: %s [line %d]!!!\n", #c, __LINE__ ); \
abort(); \
}
#define BINTEST_VERIFYOFFSET( s, m, n ) \ #define BINTEST_VERIFYOFFSET( s, m, n ) \
if (OFFSET_OF(s, m) != static_cast<size_t>(n)) \ if (OFFSET_OF(s, m) != static_cast<size_t>(n)) \
{ \ { \
...@@ -358,14 +350,6 @@ namespace cppu { ...@@ -358,14 +350,6 @@ namespace cppu {
abort(); \ abort(); \
} }
#define BINTEST_VERIFYSIZE( s, n ) \
if (sizeof(s) != static_cast<size_t>(n)) \
{ \
fprintf(stderr, "### sizeof(" #s ") = %" SAL_PRI_SIZET "u instead of expected %" SAL_PRI_SIZET "u!!!\n", \
sizeof(s), static_cast<size_t>(n)); \
abort(); \
}
struct C1 struct C1
{ {
sal_Int16 n1; sal_Int16 n1;
...@@ -471,10 +455,6 @@ struct Char4 ...@@ -471,10 +455,6 @@ struct Char4
Char3 chars; Char3 chars;
char c; char c;
}; };
class Ref
{
void * p;
};
enum Enum enum Enum
{ {
v = SAL_MAX_ENUM v = SAL_MAX_ENUM
...@@ -494,93 +474,92 @@ BinaryCompatible_Impl::BinaryCompatible_Impl() ...@@ -494,93 +474,92 @@ BinaryCompatible_Impl::BinaryCompatible_Impl()
(1 == 0) == sal_False, "must be binary compatible" ); (1 == 0) == sal_False, "must be binary compatible" );
#ifdef MAX_ALIGNMENT_4 #ifdef MAX_ALIGNMENT_4
// max alignment is 4 // max alignment is 4
BINTEST_VERIFYOFFSET( AlignSize_Impl, dDouble, 4 ); static_assert(offsetof(AlignSize_Impl, dDouble) == 4, "offsetof(AlignSize_Impl, dDouble) != 4");
BINTEST_VERIFYSIZE( AlignSize_Impl, 12 ); static_assert(sizeof(AlignSize_Impl) == 12, "sizeof(AlignSize_Impl) != 12");
#else #else
// max alignment is 8 // max alignment is 8
BINTEST_VERIFYOFFSET( AlignSize_Impl, dDouble, 8 ); static_assert(offsetof(AlignSize_Impl, dDouble) == 8, "offsetof(AlignSize_Impl, dDouble) != 8");
BINTEST_VERIFYSIZE( AlignSize_Impl, 16 ); static_assert(sizeof(AlignSize_Impl) == 16, "sizeof(AlignSize_Impl) != 16");
#endif #endif
// sequence // sequence
BINTEST_VERIFY( (SAL_SEQUENCE_HEADER_SIZE % 8) == 0 ); static_assert((SAL_SEQUENCE_HEADER_SIZE % 8) == 0, "binary compatibility test failed: (SAL_SEQUENCE_HEADER_SIZE % 8) == 0!!!");
// enum // enum
BINTEST_VERIFY( sizeof( Enum ) == sizeof( sal_Int32 ) ); static_assert(sizeof(Enum) == sizeof(sal_Int32), "binary compatibility test failed: (sizeof(Enum) == sizeof(sal_Int32))");
// any // any
BINTEST_VERIFY( sizeof(void *) >= sizeof(sal_Int32) ); static_assert(sizeof(void *) >= sizeof(sal_Int32), "binary compatibility test failed: (sizeof(void *) >= sizeof(sal_Int32))");
BINTEST_VERIFY( sizeof( uno_Any ) == sizeof( void * ) * 3 ); static_assert(sizeof(uno_Any) == sizeof(void *) * 3, "binary compatibility test failed: (sizeof(uno_Any) == sizeof(void *) * 3");
BINTEST_VERIFYOFFSET( uno_Any, pType, 0 ); static_assert(offsetof(uno_Any, pType) == 0, "offsetof(uno_Any, pType) != 0");
BINTEST_VERIFYOFFSET( uno_Any, pData, 1 * sizeof (void *) ); static_assert(offsetof(uno_Any, pData) == 1 * sizeof(void *), "offsetof(uno_Any, pTData) != (1 * sizeof(void *))");
BINTEST_VERIFYOFFSET( uno_Any, pReserved, 2 * sizeof (void *) ); static_assert(offsetof(uno_Any, pReserved) == 2 * sizeof(void *), "offsetof(uno_Any, pReserved) != (2 * sizeof(void *))");
// interface
BINTEST_VERIFY( sizeof( Ref ) == sizeof( void * ) );
// string // string
BINTEST_VERIFY( sizeof( OUString ) == sizeof( rtl_uString * ) ); static_assert(sizeof(OUString) == sizeof(rtl_uString *), "binary compatibility test failed: sizeof(OUString) != sizeof(rtl_uString *)");
// struct // struct
BINTEST_VERIFYSIZE( M, 8 ); static_assert(sizeof(M) == 8, "sizeof(M) != 8");
BINTEST_VERIFYOFFSET( M, o, 4 ); static_assert(offsetof(M, o) == 4, "offsetof(M, o) != 4");
BINTEST_VERIFYSIZE( N, 12 ); static_assert(sizeof(N) == 12, "sizeof(N) != 12");
BINTEST_VERIFYOFFSET( N, p, 8 ); BINTEST_VERIFYOFFSET(N, p, 8);
BINTEST_VERIFYSIZE( N2, 12 ); static_assert(sizeof(N2) == 12, "sizeof(N2) != 12");
BINTEST_VERIFYOFFSET( N2, p, 8 );
static_assert(offsetof(N2, p) == 8, "offsetof(N2, p) != 8");
#ifdef MAX_ALIGNMENT_4 #ifdef MAX_ALIGNMENT_4
BINTEST_VERIFYSIZE( O, 20 ); static_assert(sizeof(O) == 20, "sizeof(O) != 20");
#else #else
BINTEST_VERIFYSIZE( O, 24 ); static_assert(sizeof(O) == 24, "sizeof(O) != 24");
#endif #endif
BINTEST_VERIFYSIZE( D, 8 ); static_assert(sizeof(D) == 8, "sizeof(D) != 8");
BINTEST_VERIFYOFFSET( D, e, 4 ); static_assert(offsetof(D, e) == 4, "offsetof(D, e) != 4");
BINTEST_VERIFYOFFSET( E, d, 4 ); static_assert(offsetof(E, d) == 4, "offsetof(E, d) != 4");
BINTEST_VERIFYOFFSET( E, e, 8 ); static_assert(offsetof(E, e) == 8, "offsetof(E, e) != 8");
BINTEST_VERIFYSIZE( C1, 2 ); static_assert(sizeof(C1) == 2, "sizeof(C1) != 2");
BINTEST_VERIFYSIZE( C2, 8 ); static_assert(sizeof(C2) == 8, "sizeof(C2) != 8");
BINTEST_VERIFYOFFSET( C2, n2, 4 ); BINTEST_VERIFYOFFSET(C2, n2, 4);
#ifdef MAX_ALIGNMENT_4 #ifdef MAX_ALIGNMENT_4
BINTEST_VERIFYSIZE( C3, 20 ); static_assert(sizeof(C3) == 20, "sizeof(C3) != 20");
BINTEST_VERIFYOFFSET( C3, d3, 8 ); BINTEST_VERIFYOFFSET(C3, d3, 8);
BINTEST_VERIFYOFFSET( C3, n3, 16 ); BINTEST_VERIFYOFFSET(C3, n3, 16);
BINTEST_VERIFYSIZE( C4, 32 ); static_assert(sizeof(C4) == 32, "sizeof(C4) != 32");
BINTEST_VERIFYOFFSET( C4, n4, 20 ); BINTEST_VERIFYOFFSET(C4, n4, 20);
BINTEST_VERIFYOFFSET( C4, d4, 24 ); BINTEST_VERIFYOFFSET(C4, d4, 24);
BINTEST_VERIFYSIZE( C5, 44 ); static_assert(sizeof(C5) == 44, "sizeof(C5) != 44");
BINTEST_VERIFYOFFSET( C5, n5, 32 ); BINTEST_VERIFYOFFSET(C5, n5, 32);
BINTEST_VERIFYOFFSET( C5, b5, 40 ); BINTEST_VERIFYOFFSET(C5, b5, 40);
BINTEST_VERIFYSIZE( C6, 52 ); static_assert(sizeof(C6) == 52, "sizeof(C6) != 52");
BINTEST_VERIFYOFFSET( C6, c6, 4 ); BINTEST_VERIFYOFFSET(C6, c6, 4);
BINTEST_VERIFYOFFSET( C6, b6, 48 ); BINTEST_VERIFYOFFSET(C6, b6, 48);
BINTEST_VERIFYSIZE( O2, 24 ); static_assert(sizeof(O2) == 24, "sizeof(O2) != 24");
BINTEST_VERIFYOFFSET( O2, p2, 20 ); BINTEST_VERIFYOFFSET(O2, p2, 20);
#else #else
BINTEST_VERIFYSIZE( C3, 24 ); static_assert(sizeof(C3) == 24, "sizeof(C3) != 24");
BINTEST_VERIFYOFFSET( C3, d3, 8 ); BINTEST_VERIFYOFFSET(C3, d3, 8);
BINTEST_VERIFYOFFSET( C3, n3, 16 ); BINTEST_VERIFYOFFSET(C3, n3, 16);
BINTEST_VERIFYSIZE( C4, 40 ); static_assert(sizeof(C4) == 40, "sizeof(C4) != 40");
BINTEST_VERIFYOFFSET( C4, n4, 24 ); BINTEST_VERIFYOFFSET(C4, n4, 24);
BINTEST_VERIFYOFFSET( C4, d4, 32 ); BINTEST_VERIFYOFFSET(C4, d4, 32);
BINTEST_VERIFYSIZE( C5, 56 ); static_assert(sizeof(C5) == 56, "sizeof(C5) != 56");
BINTEST_VERIFYOFFSET( C5, n5, 40 ); BINTEST_VERIFYOFFSET(C5, n5, 40);
BINTEST_VERIFYOFFSET( C5, b5, 48 ); BINTEST_VERIFYOFFSET(C5, b5, 48);
BINTEST_VERIFYSIZE( C6, 72 ); static_assert(sizeof(C6) == 72, "sizeof(C6) != 72");
BINTEST_VERIFYOFFSET( C6, c6, 8 ); BINTEST_VERIFYOFFSET(C6, c6, 8);
BINTEST_VERIFYOFFSET( C6, b6, 64 ); BINTEST_VERIFYOFFSET(C6, b6, 64);
BINTEST_VERIFYSIZE( O2, 32 ); static_assert(sizeof(O2) == 32, "sizeof(O2) != 32");
BINTEST_VERIFYOFFSET( O2, p2, 24 ); BINTEST_VERIFYOFFSET(O2, p2, 24);
#endif #endif
BINTEST_VERIFYSIZE( Char3, 3 ); static_assert(sizeof(Char3) == 3, "sizeof(Char3) != 3");
BINTEST_VERIFYOFFSET( Char4, c, 3 ); BINTEST_VERIFYOFFSET( Char4, c, 3 );
#ifdef MAX_ALIGNMENT_4 #ifdef MAX_ALIGNMENT_4
// max alignment is 4 // max alignment is 4
BINTEST_VERIFYSIZE( P, 20 ); static_assert(sizeof(P) == 20, "sizeof(P) != 20");
#else #else
// alignment of P is 8, because of P[] ... // alignment of P is 8, because of P[] ...
BINTEST_VERIFYSIZE( P, 24 ); static_assert(sizeof(P) == 24, "sizeof(P) != 24");
BINTEST_VERIFYSIZE( second, sizeof( int ) ); static_assert(sizeof(second) == sizeof(int), "sizeof(second) != sizeof(int)");
#endif #endif
} }
......
...@@ -909,9 +909,6 @@ EnvironmentsData::~EnvironmentsData() ...@@ -909,9 +909,6 @@ EnvironmentsData::~EnvironmentsData()
if (pHard) if (pHard)
{ {
#if OSL_DEBUG_LEVEL > 1
::uno_dumpEnvironment( 0, pHard, 0 );
#endif
(*pHard->dispose)( pHard ); // send explicit dispose (*pHard->dispose)( pHard ); // send explicit dispose
(*pHard->release)( pHard ); (*pHard->release)( pHard );
} }
...@@ -1039,9 +1036,7 @@ static bool loadEnv(OUString const & cLibStem, ...@@ -1039,9 +1036,7 @@ static bool loadEnv(OUString const & cLibStem,
#endif #endif
else else
{ {
#if OSL_DEBUG_LEVEL > 1 SAL_INFO("cppu", ": Unhandled env: " << cLibStem);
OSL_TRACE( "%s: Unhandled env: %s", __PRETTY_FUNCTION__, OUStringToOString( cLibStem, RTL_TEXTENCODING_ASCII_US).getStr() );
#endif
return false; return false;
} }
#else #else
......
...@@ -32,12 +32,6 @@ ...@@ -32,12 +32,6 @@
#include "rtl/ustring.hxx" #include "rtl/ustring.hxx"
#include "rtl/alloc.h" #include "rtl/alloc.h"
#if OSL_DEBUG_LEVEL > 1
#include "rtl/ustrbuf.hxx"
#include "rtl/string.hxx"
#endif
namespace cppu namespace cppu
{ {
......
...@@ -92,6 +92,7 @@ certain functionality. ...@@ -92,6 +92,7 @@ certain functionality.
@li @c cppu @li @c cppu
@li @c cppu.log @li @c cppu.log
@li @c cppu.threadpool @li @c cppu.threadpool
@li @c cppu.typelib
@li @c cppu.unsafebridge @li @c cppu.unsafebridge
@section cppuhelper @section cppuhelper
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment