Merge pull request #1646 from tisi1988/master

FIX: Compilation warning with GCC regarding a non-initialised member …
This commit is contained in:
Gennadiy Civil 2018-08-16 15:28:20 -04:00 committed by GitHub
commit f87798a3f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2107,8 +2107,8 @@ class MutexBase {
// particular, the owner_ field (a pthread_t) is not explicitly initialized.
// This allows initialization to work whether pthread_t is a scalar or struct.
// The flag -Wmissing-field-initializers must not be specified for this to work.
# define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false }
#define GTEST_DEFINE_STATIC_MUTEX_(mutex) \
::testing::internal::MutexBase mutex = {PTHREAD_MUTEX_INITIALIZER, false, 0}
// The Mutex class can only be used for mutexes created at runtime. It
// shares its API with MutexBase otherwise.