summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-30 17:07:59 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-30 17:07:59 +0200
commit14255b68e0b3a5155a588a16096c523156b1ff55 (patch)
tree43aa7438b774acf8f9299bf819a0b2b233262c09 /sal
parent26d1a597a4c2258b652434856198c0ee8e1af87f (diff)
Coverity 1308555, 1308562, 1308600: Drop some SAL_THROW_EXTERN_C
...from most rtl/bootstrap.h functions. They are effectively only called from C++ code (there is no plain C UNO binding), so it should be fine to let std exceptions (like bad_alloc or length_error) propagate from their implementations to call sites. (The exception is rtl_bootstrap_args_close, which is typically called from C++ dtors, so should not throw anyway.) This would strictly speaking be an [API CHANGE], but it should make no practical difference whether a process terminates abruptly because an exception cannot pass through a SAL_THROW_EXTERN_C() nothrow specification or because legacy client code does not expect exceptions to be thrown from functions from which SAL_THROW_EXTERN_C() has now been removed. Change-Id: I08e8479e9c5731e46021aadd6a725c1793024d10
Diffstat (limited to 'sal')
-rw-r--r--sal/rtl/bootstrap.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index 3c34e792072e..b02ec22a2a6f 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -629,7 +629,7 @@ bootstrap_map::t * bootstrap_map::m_map = NULL;
rtlBootstrapHandle SAL_CALL rtl_bootstrap_args_open (
rtl_uString * pIniName
-) SAL_THROW_EXTERN_C()
+)
{
OUString iniName( pIniName );
@@ -721,7 +721,7 @@ sal_Bool SAL_CALL rtl_bootstrap_get_from_handle(
rtl_uString * pName,
rtl_uString ** ppValue,
rtl_uString * pDefault
-) SAL_THROW_EXTERN_C()
+)
{
osl::MutexGuard guard( osl::Mutex::getGlobalMutex() );
@@ -740,7 +740,7 @@ sal_Bool SAL_CALL rtl_bootstrap_get_from_handle(
void SAL_CALL rtl_bootstrap_get_iniName_from_handle (
rtlBootstrapHandle handle,
rtl_uString ** ppIniName
-) SAL_THROW_EXTERN_C()
+)
{
if(ppIniName)
{
@@ -759,7 +759,7 @@ void SAL_CALL rtl_bootstrap_get_iniName_from_handle (
void SAL_CALL rtl_bootstrap_setIniFileName (
rtl_uString * pName
-) SAL_THROW_EXTERN_C()
+)
{
osl::MutexGuard guard( osl::Mutex::getGlobalMutex() );
OUString & file = getIniFileName_Impl();
@@ -770,7 +770,7 @@ sal_Bool SAL_CALL rtl_bootstrap_get (
rtl_uString * pName,
rtl_uString ** ppValue,
rtl_uString * pDefault
-) SAL_THROW_EXTERN_C()
+)
{
return rtl_bootstrap_get_from_handle(0, pName, ppValue, pDefault);
}
@@ -778,7 +778,7 @@ sal_Bool SAL_CALL rtl_bootstrap_get (
void SAL_CALL rtl_bootstrap_set (
rtl_uString * pName,
rtl_uString * pValue
-) SAL_THROW_EXTERN_C()
+)
{
const OUString name( pName );
const OUString value( pValue );
@@ -827,7 +827,6 @@ void SAL_CALL rtl_bootstrap_expandMacros(rtl_uString ** macro)
}
void rtl_bootstrap_encode( rtl_uString const * value, rtl_uString ** encoded )
- SAL_THROW_EXTERN_C()
{
OSL_ASSERT(value != NULL);
rtl::OUStringBuffer b;