blob: 5b6fa30e175db3ba9aff1c65931553f613379fa4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
--- third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h.orig 2021-01-07 00:39:29 UTC
+++ third_party/googletest/src/googletest/include/gtest/internal/gtest-port.h
@@ -1641,6 +1641,8 @@ class ThreadLocal : public ThreadLocalBase {
// MutexBase and Mutex implement mutex on pthreads-based platforms.
class MutexBase {
public:
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wthread-safety-analysis"
// Acquires this mutex.
void Lock() {
GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));
@@ -1657,6 +1659,7 @@ class MutexBase {
has_owner_ = false;
GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_));
}
+#pragma GCC diagnostic pop
// Does nothing if the current thread holds the mutex. Otherwise, crashes
// with high probability.
|