diff --git a/src/addhead.cpp b/src/addhead.cpp index acea7ea..137cdef 100644 --- a/src/addhead.cpp +++ b/src/addhead.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -56,7 +55,7 @@ AdditionalHeader::AdditionalHeader() if(this == AdditionalHeader::get()){ is_enable = false; }else{ - assert(false); + abort(); } } @@ -65,7 +64,7 @@ AdditionalHeader::~AdditionalHeader() if(this == AdditionalHeader::get()){ Unload(); }else{ - assert(false); + abort(); } } diff --git a/src/cache.cpp b/src/cache.cpp index 92aac19..56514dd 100644 --- a/src/cache.cpp +++ b/src/cache.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -148,7 +147,7 @@ StatCache::StatCache() : IsExpireTime(false), IsExpireIntervalType(false), Expir stat_cache.clear(); pthread_mutex_init(&(StatCache::stat_cache_lock), NULL); }else{ - assert(false); + abort(); } } @@ -158,7 +157,7 @@ StatCache::~StatCache() Clear(); pthread_mutex_destroy(&(StatCache::stat_cache_lock)); }else{ - assert(false); + abort(); } } diff --git a/src/curl.cpp b/src/curl.cpp index ac43e61..c5e87d5 100644 --- a/src/curl.cpp +++ b/src/curl.cpp @@ -110,7 +110,8 @@ static string url_to_host(const std::string &url) } else if (url.compare(0, https.size(), https) == 0) { hostname = url.substr(https.size()); } else { - assert(!"url does not begin with http:// or https://"); + S3FS_PRN_EXIT("url does not begin with http:// or https://"); + abort(); } size_t idx; diff --git a/src/fdcache.cpp b/src/fdcache.cpp index f1dc511..66ec9d5 100644 --- a/src/fdcache.cpp +++ b/src/fdcache.cpp @@ -30,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -2000,7 +1999,7 @@ FdManager::FdManager() S3FS_PRN_CRIT("failed to init mutex"); } }else{ - assert(false); + abort(); } } @@ -2024,7 +2023,7 @@ FdManager::~FdManager() FdManager::is_lock_init = false; } }else{ - assert(false); + abort(); } }