Placate MSVC's unchecked malloc warning in thread tests.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273385 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2016-06-22 05:44:08 +00:00
parent cef97f9cc9
commit f5b30213b6

View File

@@ -36,7 +36,9 @@ void* operator new(std::size_t s) throw(std::bad_alloc)
throw std::bad_alloc();
--throw_one;
++outstanding_new;
return std::malloc(s);
void* ret = std::malloc(s);
if (!ret) std::abort(); // placate MSVC's unchecked malloc warning
return ret;
}
void operator delete(void* p) throw()