diff options
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/corereflection/base.hxx | 2 | ||||
-rw-r--r-- | stoc/source/corereflection/crefl.cxx | 4 | ||||
-rw-r--r-- | stoc/source/corereflection/lrucache.hxx | 6 | ||||
-rw-r--r-- | stoc/source/implementationregistration/implreg.cxx | 2 | ||||
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 9 | ||||
-rw-r--r-- | stoc/source/loader/dllcomponentloader.cxx | 2 | ||||
-rw-r--r-- | stoc/source/security/access_controller.cxx | 10 | ||||
-rw-r--r-- | stoc/source/security/lru_cache.h | 6 | ||||
-rw-r--r-- | stoc/source/security/permissions.cxx | 4 | ||||
-rw-r--r-- | stoc/source/servicemanager/servicemanager.cxx | 2 | ||||
-rw-r--r-- | stoc/source/tdmanager/lrucache.hxx | 6 | ||||
-rw-r--r-- | stoc/test/javavm/testjavavm.cxx | 4 | ||||
-rw-r--r-- | stoc/test/testconv.cxx | 4 | ||||
-rw-r--r-- | stoc/test/testcorefl.cxx | 2 | ||||
-rw-r--r-- | stoc/test/testintrosp.cxx | 2 |
15 files changed, 30 insertions, 35 deletions
diff --git a/stoc/source/corereflection/base.hxx b/stoc/source/corereflection/base.hxx index 4388ce68c9d4..580b5b40c703 100644 --- a/stoc/source/corereflection/base.hxx +++ b/stoc/source/corereflection/base.hxx @@ -26,8 +26,6 @@ * ************************************************************************/ // #define TEST_LIST_CLASSES -// #define TRACE(x) OSL_TRACE(x) -#define TRACE(x) #include <osl/diagnose.h> #include <osl/mutex.hxx> diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx index bf62d3e073fb..8767998dd704 100644 --- a/stoc/source/corereflection/crefl.cxx +++ b/stoc/source/corereflection/crefl.cxx @@ -105,7 +105,6 @@ IdlReflectionServiceImpl::IdlReflectionServiceImpl( //__________________________________________________________________________________________________ IdlReflectionServiceImpl::~IdlReflectionServiceImpl() { - TRACE( "> IdlReflectionServiceImpl dtor <\n" ); g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); } @@ -176,7 +175,6 @@ Sequence< sal_Int8 > IdlReflectionServiceImpl::getImplementationId() void IdlReflectionServiceImpl::dispose() throw(::com::sun::star::uno::RuntimeException) { - TRACE( "> disposing corereflection... <" ); OComponentHelper::dispose(); MutexGuard aGuard( _aComponentMutex ); @@ -273,7 +271,7 @@ inline Reference< XIdlClass > IdlReflectionServiceImpl::constructClass( #if OSL_DEBUG_LEVEL > 1 OSL_TRACE( "### corereflection type unsupported: " ); OString aName( OUStringToOString( pTypeDescr->pTypeName, RTL_TEXTENCODING_ASCII_US ) ); - OSL_TRACE( aName.getStr() ); + OSL_TRACE( "%s", aName.getStr() ); OSL_TRACE( "\n" ); #endif return Reference< XIdlClass >(); diff --git a/stoc/source/corereflection/lrucache.hxx b/stoc/source/corereflection/lrucache.hxx index 35765ef43c8f..b6e397b56306 100644 --- a/stoc/source/corereflection/lrucache.hxx +++ b/stoc/source/corereflection/lrucache.hxx @@ -166,7 +166,7 @@ inline t_Val LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::getValue( const t toFront( pEntry ); #ifdef __CACHE_DIAGNOSE OSL_TRACE( "> retrieved element \"" ); - OSL_TRACE( ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); + OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); OSL_TRACE( "\" from cache <\n" ); #endif return pEntry->aVal; @@ -191,7 +191,7 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::setValue( if (pEntry->aKey.getLength()) { OSL_TRACE( "> kicking element \"" ); - OSL_TRACE( ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); + OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); OSL_TRACE( "\" from cache <\n" ); } #endif @@ -203,7 +203,7 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::setValue( pEntry = (*iFind).second; #ifdef __CACHE_DIAGNOSE OSL_TRACE( "> replacing element \"" ); - OSL_TRACE( ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); + OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); OSL_TRACE( "\" in cache <\n" ); #endif } diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx index 9c91c43a0e5f..7ae7b28918cb 100644 --- a/stoc/source/implementationregistration/implreg.cxx +++ b/stoc/source/implementationregistration/implreg.cxx @@ -1662,7 +1662,7 @@ sal_Bool ImplementationRegistration::revokeImplementation(const OUString& locati { // no way to transport the error, as no exception is specified and a runtime // exception is not appropriate. - OSL_ENSURE( 0 , "InvalidRegistryException during revokeImplementation" ); + OSL_FAIL( "InvalidRegistryException during revokeImplementation" ); } } diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index b2ad9c206725..caa0fe910c79 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -1388,7 +1388,7 @@ JavaVirtualMachine::~JavaVirtualMachine() } catch (css::uno::Exception &) { - OSL_ENSURE(false, "com.sun.star.uno.Exception caught"); + OSL_FAIL("com.sun.star.uno.Exception caught"); } if (m_xJavaConfiguration.is()) // We should never get here, but just in case... @@ -1398,7 +1398,7 @@ JavaVirtualMachine::~JavaVirtualMachine() } catch (css::uno::Exception &) { - OSL_ENSURE(false, "com.sun.star.uno.Exception caught"); + OSL_FAIL("com.sun.star.uno.Exception caught"); } } @@ -1625,12 +1625,11 @@ void JavaVirtualMachine::setINetSettingsInVM(bool set_reset) } catch (css::uno::RuntimeException &) { - OSL_ENSURE(false, "RuntimeException"); + OSL_FAIL("RuntimeException"); } catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &) { - OSL_ENSURE(false, - "jvmaccess::VirtualMachine::AttachGuard::CreationException"); + OSL_FAIL("jvmaccess::VirtualMachine::AttachGuard::CreationException"); } } diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx index 1769ac5874f0..e326b980909f 100644 --- a/stoc/source/loader/dllcomponentloader.cxx +++ b/stoc/source/loader/dllcomponentloader.cxx @@ -179,7 +179,7 @@ Sequence<OUString> SAL_CALL DllComponentLoader::getSupportedServiceNames( ) void DllComponentLoader::initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException) { - OSL_ENSURE( 0, "dllcomponentloader::initialize should not be called !" ); + OSL_FAIL( "dllcomponentloader::initialize should not be called !" ); // if( aArgs.getLength() != 1 ) // { // throw IllegalArgumentException(); diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx index 816dd6868798..18ddc87b6425 100644 --- a/stoc/source/security/access_controller.cxx +++ b/stoc/source/security/access_controller.cxx @@ -616,13 +616,13 @@ static void dumpPermissions( RTL_CONSTASCII_STRINGPARAM("> dumping default permissions:") ); } OString str( ::rtl::OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); - OSL_TRACE( str.getStr() ); + OSL_TRACE( "%s", str.getStr() ); Sequence< OUString > permissions( collection.toStrings() ); OUString const * p = permissions.getConstArray(); for ( sal_Int32 nPos = 0; nPos < permissions.getLength(); ++nPos ) { OString str( ::rtl::OUStringToOString( p[ nPos ], RTL_TEXTENCODING_ASCII_US ) ); - OSL_TRACE( str.getStr() ); + OSL_TRACE( "%s", str.getStr() ); } OSL_TRACE( "> permission dump done" ); } @@ -689,7 +689,7 @@ void AccessController::checkAndClearPostPoned() SAL_THROW( (RuntimeException) ) break; } default: - OSL_ENSURE( 0, "### this should never be called in this ac mode!" ); + OSL_FAIL( "### this should never be called in this ac mode!" ); break; } } @@ -743,7 +743,7 @@ PermissionCollection AccessController::getEffectivePermissions( break; } default: - OSL_ENSURE( 0, "### this should never be called in this ac mode!" ); + OSL_FAIL( "### this should never be called in this ac mode!" ); return PermissionCollection(); } @@ -764,7 +764,7 @@ PermissionCollection AccessController::getEffectivePermissions( buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\"") ); OString str( ::rtl::OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); - OSL_TRACE( str.getStr() ); + OSL_TRACE( "%s", str.getStr() ); #endif return PermissionCollection( new AllPermission() ); } diff --git a/stoc/source/security/lru_cache.h b/stoc/source/security/lru_cache.h index 4b7440e9dce8..123e0b181a19 100644 --- a/stoc/source/security/lru_cache.h +++ b/stoc/source/security/lru_cache.h @@ -203,7 +203,7 @@ inline t_val const * lru_cache< t_key, t_val, t_hashKey, t_equalKey >::lookup( buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" from cache") ); ::rtl::OString str( ::rtl::OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); - OSL_TRACE( str.getStr() ); + OSL_TRACE( "%s", str.getStr() ); #endif return &entry->m_val; } @@ -232,7 +232,7 @@ inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::set( buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" from cache") ); ::rtl::OString str( ::rtl::OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); - OSL_TRACE( str.getStr() ); + OSL_TRACE( "%s", str.getStr() ); } #endif m_key2element.erase( entry->m_key ); @@ -253,7 +253,7 @@ inline void lru_cache< t_key, t_val, t_hashKey, t_equalKey >::set( buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" in cache") ); ::rtl::OString str( ::rtl::OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); - OSL_TRACE( str.getStr() ); + OSL_TRACE( "%s", str.getStr() ); #endif } entry->m_val = val; diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx index 23a99a1fd0da..c41643287020 100644 --- a/stoc/source/security/permissions.cxx +++ b/stoc/source/security/permissions.cxx @@ -89,7 +89,7 @@ static inline sal_Int32 makeMask( buf.append( item ); ::rtl::OString str( ::rtl::OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); - OSL_TRACE( str.getStr() ); + OSL_TRACE( "%s", str.getStr() ); } #endif } @@ -580,7 +580,7 @@ static void demanded_diag( buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" => ok.") ); ::rtl::OString str( ::rtl::OUStringToOString( buf.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US ) ); - OSL_TRACE( str.getStr() ); + OSL_TRACE( "%s", str.getStr() ); } #endif //-------------------------------------------------------------------------------------------------- diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 664a5a82a90d..ce0d1b32adad 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -1376,7 +1376,7 @@ void OServiceManager::initialize( Sequence< Any > const & ) throw (Exception) { check_undisposed(); - OSL_ENSURE( 0, "not impl!" ); + OSL_FAIL( "not impl!" ); } // XServiceInfo diff --git a/stoc/source/tdmanager/lrucache.hxx b/stoc/source/tdmanager/lrucache.hxx index 4f14fc7a2a91..36f3c62390c5 100644 --- a/stoc/source/tdmanager/lrucache.hxx +++ b/stoc/source/tdmanager/lrucache.hxx @@ -170,7 +170,7 @@ inline t_Val LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::getValue( toFront( pEntry ); #ifdef __CACHE_DIAGNOSE OSL_TRACE( "> retrieved element \"" ); - OSL_TRACE( ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); + OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); OSL_TRACE( "\" from cache <\n" ); #endif return pEntry->aVal; @@ -195,7 +195,7 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::setValue( if (pEntry->aKey.getLength()) { OSL_TRACE( "> kicking element \"" ); - OSL_TRACE( ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); + OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); OSL_TRACE( "\" from cache <\n" ); } #endif @@ -207,7 +207,7 @@ inline void LRU_Cache< t_Key, t_Val, t_KeyHash, t_KeyEqual >::setValue( pEntry = (*iFind).second; #ifdef __CACHE_DIAGNOSE OSL_TRACE( "> replacing element \"" ); - OSL_TRACE( ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); + OSL_TRACE( "%s", ::rtl::OUStringToOString( pEntry->aKey, RTL_TEXTENCODING_ASCII_US ).getStr() ); OSL_TRACE( "\" in cache <\n" ); #endif } diff --git a/stoc/test/javavm/testjavavm.cxx b/stoc/test/javavm/testjavavm.cxx index 0329f785b046..2cffe1541b66 100644 --- a/stoc/test/javavm/testjavavm.cxx +++ b/stoc/test/javavm/testjavavm.cxx @@ -79,7 +79,7 @@ sal_Bool testJavaVM(const Reference< XMultiServiceFactory > & xMgr ) Any anyVM = xVM->getJavaVM( Sequence<sal_Int8>(arId, 16)); if ( ! anyVM.hasValue()) { - OSL_ENSURE(0,"could not get Java VM"); + OSL_FAIL("could not get Java VM"); return sal_False; } @@ -158,7 +158,7 @@ SAL_IMPLEMENT_MAIN() OSL_ENSURE( sal_False, "### exception occurred!" ); OString aMsg( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) ); OSL_TRACE( "### exception occurred: " ); - OSL_TRACE( aMsg.getStr() ); + OSL_TRACE( "%s", aMsg.getStr() ); OSL_TRACE( "\n" ); } diff --git a/stoc/test/testconv.cxx b/stoc/test/testconv.cxx index d8c0dd359e6a..a7f8f9926ae3 100644 --- a/stoc/test/testconv.cxx +++ b/stoc/test/testconv.cxx @@ -84,7 +84,7 @@ static void printValue( const Any & rVal ) char ar[2]; ar[0] = (char)*(sal_Unicode *)rVal.getValue(); ar[1] = 0; - printf( ar ); + printf( "%s", ar ); break; } case TypeClass_BYTE: @@ -699,7 +699,7 @@ SAL_IMPLEMENT_MAIN() OSL_ENSURE( sal_False, "### exception occurred!" ); OString aMsg( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) ); OSL_TRACE( "### exception occurred: " ); - OSL_TRACE( aMsg.getStr() ); + OSL_TRACE( "%s", aMsg.getStr() ); OSL_TRACE( "\n" ); } diff --git a/stoc/test/testcorefl.cxx b/stoc/test/testcorefl.cxx index 63bde05d44e2..e43687c92f5b 100644 --- a/stoc/test/testcorefl.cxx +++ b/stoc/test/testcorefl.cxx @@ -407,7 +407,7 @@ SAL_IMPLEMENT_MAIN() OString aMsg( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) ); OSL_TRACE( "### exception occurred: " ); - OSL_TRACE( aMsg.getStr() ); + OSL_TRACE( "%s", aMsg.getStr() ); OSL_TRACE( "\n" ); } diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx index 9a075333fac6..000d95279983 100644 --- a/stoc/test/testintrosp.cxx +++ b/stoc/test/testintrosp.cxx @@ -1244,7 +1244,7 @@ SAL_IMPLEMENT_MAIN() OSL_ENSURE( sal_False, "### exception occurred!" ); OString aMsg( OUStringToOString( rExc.Message, RTL_TEXTENCODING_ASCII_US ) ); OSL_TRACE( "### exception occurred: " ); - OSL_TRACE( aMsg.getStr() ); + OSL_TRACE( "%s", aMsg.getStr() ); OSL_TRACE( "\n" ); } |