summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRohan Kumar <rohankanojia420@gmail.com>2016-03-08 22:22:16 +0530
committerStephan Bergmann <sbergman@redhat.com>2016-03-08 16:57:42 +0000
commit05bca569232d0ece0c6700513b7b1351238c85ec (patch)
treee0a32149bd6ca00399e46e1c1c35a0a961fdf57f
parentb38f58a3f959b5e36813f8c2d88bdb2baf03a1b9 (diff)
tdf#91794: Remove OSL_DEBUG_LEVEL > 1 conditionals
Updates pointed by sberg Change-Id: Ie12548dfa9ad3a6836efbfe64153bc075f138fc6 Reviewed-on: https://gerrit.libreoffice.org/22622 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--cppu/source/threadpool/thread.cxx8
-rw-r--r--cppu/source/typelib/typelib.cxx73
-rw-r--r--cppu/source/uno/data.cxx147
-rw-r--r--cppu/source/uno/lbenv.cxx7
-rw-r--r--cppu/source/uno/prim.hxx6
-rw-r--r--include/sal/log-areas.dox1
6 files changed, 96 insertions, 146 deletions
diff --git a/cppu/source/threadpool/thread.cxx b/cppu/source/threadpool/thread.cxx
index 3b95c8d5d5bb..06fd30dd3ba2 100644
--- a/cppu/source/threadpool/thread.cxx
+++ b/cppu/source/threadpool/thread.cxx
@@ -23,6 +23,7 @@
#include <cstdlib>
#include <osl/diagnose.h>
#include <uno/threadpool.h>
+#include <sal/log.hxx>
#include "thread.hxx"
#include "jobqueue.hxx"
@@ -38,12 +39,7 @@ namespace cppu_threadpool {
ThreadAdmin::~ThreadAdmin()
{
-#if OSL_DEBUG_LEVEL > 1
- if( m_lst.size() )
- {
- fprintf( stderr, "%lu Threads left\n" , static_cast<unsigned long>(m_lst.size()) );
- }
-#endif
+ SAL_WARN_IF(m_lst.size(), "cppu.threadpool", m_lst.size() << "Threads left");
}
bool ThreadAdmin::add( rtl::Reference< ORequestThread > const & p )
diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index f873b752efd6..12fe995b2640 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -18,10 +18,6 @@
*/
-#if OSL_DEBUG_LEVEL > 1
-#include <stdio.h>
-#endif
-
#include <unordered_map>
#include <cassert>
#include <list>
@@ -188,7 +184,7 @@ struct TypeDescriptor_Init_Impl
inline void callChain( typelib_TypeDescription ** ppRet, rtl_uString * pName );
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
// only for debugging
sal_Int32 nTypeDescriptionCount;
sal_Int32 nCompoundTypeDescriptionCount;
@@ -202,7 +198,7 @@ struct TypeDescriptor_Init_Impl
TypeDescriptor_Init_Impl():
pWeakMap(nullptr), pCallbacks(nullptr), pCache(nullptr), pMutex(nullptr)
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
, nTypeDescriptionCount(0), nCompoundTypeDescriptionCount(0),
nIndirectTypeDescriptionCount(0),
nEnumTypeDescriptionCount(0),
@@ -290,41 +286,38 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl()
typelib_typedescriptionreference_release( pTDR );
}
-#if OSL_DEBUG_LEVEL > 1
aIt = pWeakMap->begin();
+#if defined SAL_LOG_INFO
while( aIt != pWeakMap->end() )
{
typelib_TypeDescriptionReference * pTDR = (*aIt).second;
if (pTDR)
{
OString aTypeName( rtl::OUStringToOString( pTDR->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
- OSL_TRACE(
- "### remaining type: %s; ref count = %d", aTypeName.getStr(), pTDR->nRefCount );
+ SAL_INFO("cppu.typelib", "remaining type: " << aTypeName << "; ref count = " << pTDR->nRefCount);
}
else
{
- OSL_TRACE( "### remaining null type entry!?" );
+ SAL_INFO("cppu.typelib", "remaining null type entry!?");
}
++aIt;
}
#endif
-
delete pWeakMap;
pWeakMap = nullptr;
}
-#if OSL_DEBUG_LEVEL > 1
- OSL_ENSURE( !nTypeDescriptionCount, "### nTypeDescriptionCount is not zero" );
- OSL_ENSURE( !nCompoundTypeDescriptionCount, "### nCompoundTypeDescriptionCount is not zero" );
- OSL_ENSURE( !nIndirectTypeDescriptionCount, "### nIndirectTypeDescriptionCount is not zero" );
- OSL_ENSURE( !nEnumTypeDescriptionCount, "### nEnumTypeDescriptionCount is not zero" );
- OSL_ENSURE( !nInterfaceMethodTypeDescriptionCount, "### nInterfaceMethodTypeDescriptionCount is not zero" );
- OSL_ENSURE( !nInterfaceAttributeTypeDescriptionCount, "### nInterfaceAttributeTypeDescriptionCount is not zero" );
- OSL_ENSURE( !nInterfaceTypeDescriptionCount, "### nInterfaceTypeDescriptionCount is not zero" );
- OSL_ENSURE( !nTypeDescriptionReferenceCount, "### nTypeDescriptionReferenceCount is not zero" );
-
- OSL_ENSURE( !pCallbacks || pCallbacks->empty(), "### pCallbacks is not NULL or empty" );
+#if OSL_DEBUG_LEVEL > 0
+ SAL_WARN_IF( (!nTypeDescriptionCount), "cppu.typelib", "nTypeDescriptionCount is not zero" );
+ SAL_WARN_IF( (!nCompoundTypeDescriptionCount), "cppu.typelib", "nCompoundTypeDescriptionCount is not zero" );
+ SAL_WARN_IF( (!nIndirectTypeDescriptionCount), "cppu.typelib", "nIndirectTypeDescriptionCount is not zero" );
+ SAL_WARN_IF( (!nEnumTypeDescriptionCount), "cppu.typelib", "nEnumTypeDescriptionCount is not zero" );
+ SAL_WARN_IF( (!nInterfaceMethodTypeDescriptionCount), "cppu.typelib", "nInterfaceMethodTypeDescriptionCount is not zero" );
+ SAL_WARN_IF( (!nInterfaceAttributeTypeDescriptionCount), "cppu.typelib", "nInterfaceAttributeTypeDescriptionCount is not zero" );
+ SAL_WARN_IF( (!nInterfaceTypeDescriptionCount), "cppu.typelib", "nInterfaceTypeDescriptionCount is not zero" );
+ SAL_WARN_IF( (!nTypeDescriptionReferenceCount), "cppu.typelib", "nTypeDescriptionReferenceCount is not zero" );
#endif
+ SAL_WARN_IF( (!pCallbacks || pCallbacks->empty()), "cppu.typelib", "pCallbacks is not NULL or empty" );
delete pCallbacks;
pCallbacks = nullptr;
@@ -395,13 +388,10 @@ static inline void typelib_typedescription_initTables(
aReadWriteAttributes[i] = !reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>(pM)->bReadOnly;
TYPELIB_DANGER_RELEASE( pM );
}
-#if OSL_DEBUG_LEVEL > 1
else
{
- OString aStr( rtl::OUStringToOString( pITD->ppAllMembers[i]->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
- OSL_TRACE( "\n### cannot get attribute type description: %s", aStr.getStr() );
+ SAL_INFO( "cppu.typelib", "cannot get attribute type description: " << pITD->ppAllMembers[i]->pTypeName );
}
-#endif
}
}
@@ -541,11 +531,9 @@ bool complete(typelib_TypeDescription ** ppTypeDescr, bool initTables) {
}
else
{
-#if OSL_DEBUG_LEVEL > 1
OString aStr(
rtl::OUStringToOString( (*ppTypeDescr)->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
- OSL_TRACE( "\n### type cannot be completed: %s", aStr.getStr() );
-#endif
+ SAL_INFO( "cppu.typelib", "type cannot be completed: " << aStr.getStr() );
return false;
}
}
@@ -575,7 +563,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
{
auto pTmp = allocTypeDescription<typelib_IndirectTypeDescription>();
pRet = &pTmp->aBase;
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &Init::get().nIndirectTypeDescriptionCount );
#endif
pTmp->pType = nullptr;
@@ -587,7 +575,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
// FEATURE_EMPTYCLASS
auto pTmp = allocTypeDescription<typelib_StructTypeDescription>();
pRet = &pTmp->aBase.aBase;
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &Init::get().nCompoundTypeDescriptionCount );
#endif
pTmp->aBase.pBaseTypeDescription = nullptr;
@@ -604,7 +592,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
// FEATURE_EMPTYCLASS
auto pTmp = allocTypeDescription<typelib_CompoundTypeDescription>();
pRet = &pTmp->aBase;
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &Init::get().nCompoundTypeDescriptionCount );
#endif
pTmp->pBaseTypeDescription = nullptr;
@@ -619,7 +607,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
{
auto pTmp = allocTypeDescription<typelib_EnumTypeDescription>();
pRet = &pTmp->aBase;
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &Init::get().nEnumTypeDescriptionCount );
#endif
pTmp->nDefaultEnumValue = 0;
@@ -634,7 +622,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
auto pTmp = allocTypeDescription<
typelib_InterfaceTypeDescription>();
pRet = &pTmp->aBase;
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &Init::get().nInterfaceTypeDescriptionCount );
#endif
pTmp->pBaseTypeDescription = nullptr;
@@ -655,7 +643,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
auto pTmp = allocTypeDescription<
typelib_InterfaceMethodTypeDescription>();
pRet = &pTmp->aBase.aBase;
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &Init::get().nInterfaceMethodTypeDescriptionCount );
#endif
pTmp->aBase.pMemberName = nullptr;
@@ -675,7 +663,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
auto * pTmp = allocTypeDescription<
typelib_InterfaceAttributeTypeDescription>();
pRet = &pTmp->aBase.aBase;
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &Init::get().nInterfaceAttributeTypeDescriptionCount );
#endif
pTmp->aBase.pMemberName = nullptr;
@@ -693,7 +681,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty(
default:
{
pRet = allocTypeDescription<typelib_TypeDescription>();
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &Init::get().nTypeDescriptionCount );
#endif
}
@@ -1438,7 +1426,7 @@ extern "C" void SAL_CALL typelib_typedescription_release(
typelib_typedescription_destructExtendedMembers( pTD );
rtl_uString_release( pTD->pTypeName );
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
switch( pTD->eTypeClass )
{
case typelib_TypeClass_SEQUENCE:
@@ -2117,10 +2105,7 @@ extern "C" void SAL_CALL typelib_typedescriptionreference_new(
}
else if (*ppTDR)
{
-#if OSL_DEBUG_LEVEL > 1
- OString aStr( rtl::OUStringToOString( pTypeName, RTL_TEXTENCODING_ASCII_US ) );
- OSL_ENSURE( !"### typedef not found: ", aStr.getStr() );
-#endif
+ SAL_INFO("cppu.typelib", "typedef not found : " << pTypeName);
typelib_typedescriptionreference_release( *ppTDR );
*ppTDR = nullptr;
}
@@ -2135,7 +2120,7 @@ extern "C" void SAL_CALL typelib_typedescriptionreference_new(
if( reallyWeak( eTypeClass ) )
{
typelib_TypeDescriptionReference * pTDR = new typelib_TypeDescriptionReference();
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
osl_atomic_increment( &rInit.nTypeDescriptionReferenceCount );
#endif
pTDR->nRefCount = 1;
@@ -2194,7 +2179,7 @@ extern "C" void SAL_CALL typelib_typedescriptionreference_release(
rtl_uString_release( pRef->pTypeName );
OSL_ASSERT( pRef->pType == nullptr );
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
osl_atomic_decrement( &rInit.nTypeDescriptionReferenceCount );
#endif
delete pRef;
diff --git a/cppu/source/uno/data.cxx b/cppu/source/uno/data.cxx
index f0da767cd4b5..088f1769ea63 100644
--- a/cppu/source/uno/data.cxx
+++ b/cppu/source/uno/data.cxx
@@ -321,8 +321,7 @@ sal_Bool SAL_CALL uno_type_isAssignableFromData(
}
-#if OSL_DEBUG_LEVEL > 1
-
+#if OSL_DEBUG_LEVEL > 0
namespace cppu {
#if defined( SAL_W32)
@@ -343,13 +342,6 @@ namespace cppu {
#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 ) \
if (OFFSET_OF(s, m) != static_cast<size_t>(n)) \
{ \
@@ -358,14 +350,6 @@ namespace cppu {
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
{
sal_Int16 n1;
@@ -471,10 +455,6 @@ struct Char4
Char3 chars;
char c;
};
-class Ref
-{
- void * p;
-};
enum Enum
{
v = SAL_MAX_ENUM
@@ -494,93 +474,92 @@ BinaryCompatible_Impl::BinaryCompatible_Impl()
(1 == 0) == sal_False, "must be binary compatible" );
#ifdef MAX_ALIGNMENT_4
// max alignment is 4
- BINTEST_VERIFYOFFSET( AlignSize_Impl, dDouble, 4 );
- BINTEST_VERIFYSIZE( AlignSize_Impl, 12 );
+ static_assert(offsetof(AlignSize_Impl, dDouble) == 4, "offsetof(AlignSize_Impl, dDouble) != 4");
+ static_assert(sizeof(AlignSize_Impl) == 12, "sizeof(AlignSize_Impl) != 12");
#else
// max alignment is 8
- BINTEST_VERIFYOFFSET( AlignSize_Impl, dDouble, 8 );
- BINTEST_VERIFYSIZE( AlignSize_Impl, 16 );
+ static_assert(offsetof(AlignSize_Impl, dDouble) == 8, "offsetof(AlignSize_Impl, dDouble) != 8");
+ static_assert(sizeof(AlignSize_Impl) == 16, "sizeof(AlignSize_Impl) != 16");
#endif
// 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
- BINTEST_VERIFY( sizeof( Enum ) == sizeof( sal_Int32 ) );
+ static_assert(sizeof(Enum) == sizeof(sal_Int32), "binary compatibility test failed: (sizeof(Enum) == sizeof(sal_Int32))");
// any
- BINTEST_VERIFY( sizeof(void *) >= sizeof(sal_Int32) );
- BINTEST_VERIFY( sizeof( uno_Any ) == sizeof( void * ) * 3 );
- BINTEST_VERIFYOFFSET( uno_Any, pType, 0 );
- BINTEST_VERIFYOFFSET( uno_Any, pData, 1 * sizeof (void *) );
- BINTEST_VERIFYOFFSET( uno_Any, pReserved, 2 * sizeof (void *) );
- // interface
- BINTEST_VERIFY( sizeof( Ref ) == sizeof( void * ) );
+ static_assert(sizeof(void *) >= sizeof(sal_Int32), "binary compatibility test failed: (sizeof(void *) >= sizeof(sal_Int32))");
+ static_assert(sizeof(uno_Any) == sizeof(void *) * 3, "binary compatibility test failed: (sizeof(uno_Any) == sizeof(void *) * 3");
+ static_assert(offsetof(uno_Any, pType) == 0, "offsetof(uno_Any, pType) != 0");
+ static_assert(offsetof(uno_Any, pData) == 1 * sizeof(void *), "offsetof(uno_Any, pTData) != (1 * sizeof(void *))");
+ static_assert(offsetof(uno_Any, pReserved) == 2 * sizeof(void *), "offsetof(uno_Any, pReserved) != (2 * sizeof(void *))");
// 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
- BINTEST_VERIFYSIZE( M, 8 );
- BINTEST_VERIFYOFFSET( M, o, 4 );
- BINTEST_VERIFYSIZE( N, 12 );
- BINTEST_VERIFYOFFSET( N, p, 8 );
- BINTEST_VERIFYSIZE( N2, 12 );
- BINTEST_VERIFYOFFSET( N2, p, 8 );
+ static_assert(sizeof(M) == 8, "sizeof(M) != 8");
+ static_assert(offsetof(M, o) == 4, "offsetof(M, o) != 4");
+ static_assert(sizeof(N) == 12, "sizeof(N) != 12");
+ BINTEST_VERIFYOFFSET(N, p, 8);
+ static_assert(sizeof(N2) == 12, "sizeof(N2) != 12");
+
+ static_assert(offsetof(N2, p) == 8, "offsetof(N2, p) != 8");
#ifdef MAX_ALIGNMENT_4
- BINTEST_VERIFYSIZE( O, 20 );
+ static_assert(sizeof(O) == 20, "sizeof(O) != 20");
#else
- BINTEST_VERIFYSIZE( O, 24 );
+ static_assert(sizeof(O) == 24, "sizeof(O) != 24");
#endif
- BINTEST_VERIFYSIZE( D, 8 );
- BINTEST_VERIFYOFFSET( D, e, 4 );
- BINTEST_VERIFYOFFSET( E, d, 4 );
- BINTEST_VERIFYOFFSET( E, e, 8 );
+ static_assert(sizeof(D) == 8, "sizeof(D) != 8");
+ static_assert(offsetof(D, e) == 4, "offsetof(D, e) != 4");
+ static_assert(offsetof(E, d) == 4, "offsetof(E, d) != 4");
+ static_assert(offsetof(E, e) == 8, "offsetof(E, e) != 8");
- BINTEST_VERIFYSIZE( C1, 2 );
- BINTEST_VERIFYSIZE( C2, 8 );
- BINTEST_VERIFYOFFSET( C2, n2, 4 );
+ static_assert(sizeof(C1) == 2, "sizeof(C1) != 2");
+ static_assert(sizeof(C2) == 8, "sizeof(C2) != 8");
+ BINTEST_VERIFYOFFSET(C2, n2, 4);
#ifdef MAX_ALIGNMENT_4
- BINTEST_VERIFYSIZE( C3, 20 );
- BINTEST_VERIFYOFFSET( C3, d3, 8 );
- BINTEST_VERIFYOFFSET( C3, n3, 16 );
- BINTEST_VERIFYSIZE( C4, 32 );
- BINTEST_VERIFYOFFSET( C4, n4, 20 );
- BINTEST_VERIFYOFFSET( C4, d4, 24 );
- BINTEST_VERIFYSIZE( C5, 44 );
- BINTEST_VERIFYOFFSET( C5, n5, 32 );
- BINTEST_VERIFYOFFSET( C5, b5, 40 );
- BINTEST_VERIFYSIZE( C6, 52 );
- BINTEST_VERIFYOFFSET( C6, c6, 4 );
- BINTEST_VERIFYOFFSET( C6, b6, 48 );
-
- BINTEST_VERIFYSIZE( O2, 24 );
- BINTEST_VERIFYOFFSET( O2, p2, 20 );
+ static_assert(sizeof(C3) == 20, "sizeof(C3) != 20");
+ BINTEST_VERIFYOFFSET(C3, d3, 8);
+ BINTEST_VERIFYOFFSET(C3, n3, 16);
+ static_assert(sizeof(C4) == 32, "sizeof(C4) != 32");
+ BINTEST_VERIFYOFFSET(C4, n4, 20);
+ BINTEST_VERIFYOFFSET(C4, d4, 24);
+ static_assert(sizeof(C5) == 44, "sizeof(C5) != 44");
+ BINTEST_VERIFYOFFSET(C5, n5, 32);
+ BINTEST_VERIFYOFFSET(C5, b5, 40);
+ static_assert(sizeof(C6) == 52, "sizeof(C6) != 52");
+ BINTEST_VERIFYOFFSET(C6, c6, 4);
+ BINTEST_VERIFYOFFSET(C6, b6, 48);
+
+ static_assert(sizeof(O2) == 24, "sizeof(O2) != 24");
+ BINTEST_VERIFYOFFSET(O2, p2, 20);
#else
- BINTEST_VERIFYSIZE( C3, 24 );
- BINTEST_VERIFYOFFSET( C3, d3, 8 );
- BINTEST_VERIFYOFFSET( C3, n3, 16 );
- BINTEST_VERIFYSIZE( C4, 40 );
- BINTEST_VERIFYOFFSET( C4, n4, 24 );
- BINTEST_VERIFYOFFSET( C4, d4, 32 );
- BINTEST_VERIFYSIZE( C5, 56 );
- BINTEST_VERIFYOFFSET( C5, n5, 40 );
- BINTEST_VERIFYOFFSET( C5, b5, 48 );
- BINTEST_VERIFYSIZE( C6, 72 );
- BINTEST_VERIFYOFFSET( C6, c6, 8 );
- BINTEST_VERIFYOFFSET( C6, b6, 64 );
-
- BINTEST_VERIFYSIZE( O2, 32 );
- BINTEST_VERIFYOFFSET( O2, p2, 24 );
+ static_assert(sizeof(C3) == 24, "sizeof(C3) != 24");
+ BINTEST_VERIFYOFFSET(C3, d3, 8);
+ BINTEST_VERIFYOFFSET(C3, n3, 16);
+ static_assert(sizeof(C4) == 40, "sizeof(C4) != 40");
+ BINTEST_VERIFYOFFSET(C4, n4, 24);
+ BINTEST_VERIFYOFFSET(C4, d4, 32);
+ static_assert(sizeof(C5) == 56, "sizeof(C5) != 56");
+ BINTEST_VERIFYOFFSET(C5, n5, 40);
+ BINTEST_VERIFYOFFSET(C5, b5, 48);
+ static_assert(sizeof(C6) == 72, "sizeof(C6) != 72");
+ BINTEST_VERIFYOFFSET(C6, c6, 8);
+ BINTEST_VERIFYOFFSET(C6, b6, 64);
+
+ static_assert(sizeof(O2) == 32, "sizeof(O2) != 32");
+ BINTEST_VERIFYOFFSET(O2, p2, 24);
#endif
- BINTEST_VERIFYSIZE( Char3, 3 );
+ static_assert(sizeof(Char3) == 3, "sizeof(Char3) != 3");
BINTEST_VERIFYOFFSET( Char4, c, 3 );
#ifdef MAX_ALIGNMENT_4
// max alignment is 4
- BINTEST_VERIFYSIZE( P, 20 );
+ static_assert(sizeof(P) == 20, "sizeof(P) != 20");
#else
// alignment of P is 8, because of P[] ...
- BINTEST_VERIFYSIZE( P, 24 );
- BINTEST_VERIFYSIZE( second, sizeof( int ) );
+ static_assert(sizeof(P) == 24, "sizeof(P) != 24");
+ static_assert(sizeof(second) == sizeof(int), "sizeof(second) != sizeof(int)");
#endif
}
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index c5cdaa55e120..b0eb821fecc1 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -909,9 +909,6 @@ EnvironmentsData::~EnvironmentsData()
if (pHard)
{
-#if OSL_DEBUG_LEVEL > 1
- ::uno_dumpEnvironment( 0, pHard, 0 );
-#endif
(*pHard->dispose)( pHard ); // send explicit dispose
(*pHard->release)( pHard );
}
@@ -1039,9 +1036,7 @@ static bool loadEnv(OUString const & cLibStem,
#endif
else
{
-#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE( "%s: Unhandled env: %s", __PRETTY_FUNCTION__, OUStringToOString( cLibStem, RTL_TEXTENCODING_ASCII_US).getStr() );
-#endif
+ SAL_INFO("cppu", ": Unhandled env: " << cLibStem);
return false;
}
#else
diff --git a/cppu/source/uno/prim.hxx b/cppu/source/uno/prim.hxx
index 03bae2abb334..619dba3a1255 100644
--- a/cppu/source/uno/prim.hxx
+++ b/cppu/source/uno/prim.hxx
@@ -32,12 +32,6 @@
#include "rtl/ustring.hxx"
#include "rtl/alloc.h"
-#if OSL_DEBUG_LEVEL > 1
-#include "rtl/ustrbuf.hxx"
-#include "rtl/string.hxx"
-#endif
-
-
namespace cppu
{
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 1183e6d466c9..207f843af782 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -92,6 +92,7 @@ certain functionality.
@li @c cppu
@li @c cppu.log
@li @c cppu.threadpool
+@li @c cppu.typelib
@li @c cppu.unsafebridge
@section cppuhelper