From: Pierre Ossman Date: Fri, 15 Sep 2017 13:40:47 +0000 (+0200) Subject: Don't throw exceptions in destructors X-Git-Tag: v1.8.90~106 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ca0c5f571410d03fdbdf6e1b6cb18fcf79f26ea4;p=tigervnc.git Don't throw exceptions in destructors --- diff --git a/common/os/Mutex.cxx b/common/os/Mutex.cxx index fcbd0ac7..13013cfb 100644 --- a/common/os/Mutex.cxx +++ b/common/os/Mutex.cxx @@ -49,12 +49,8 @@ Mutex::~Mutex() DeleteCriticalSection((CRITICAL_SECTION*)systemMutex); delete (CRITICAL_SECTION*)systemMutex; #else - int ret; - - ret = pthread_mutex_destroy((pthread_mutex_t*)systemMutex); + pthread_mutex_destroy((pthread_mutex_t*)systemMutex); delete (pthread_mutex_t*)systemMutex; - if (ret != 0) - throw rdr::SystemException("Failed to destroy mutex", ret); #endif } @@ -106,12 +102,8 @@ Condition::~Condition() #ifdef WIN32 delete (CONDITION_VARIABLE*)systemCondition; #else - int ret; - - ret = pthread_cond_destroy((pthread_cond_t*)systemCondition); + pthread_cond_destroy((pthread_cond_t*)systemCondition); delete (pthread_cond_t*)systemCondition; - if (ret != 0) - throw rdr::SystemException("Failed to destroy condition variable", ret); #endif }