diff options
author | Billy Donahue <BillyDonahue@users.noreply.github.com> | 2015-11-24 18:51:39 (GMT) |
---|---|---|
committer | Billy Donahue <BillyDonahue@users.noreply.github.com> | 2015-11-24 18:51:39 (GMT) |
commit | ffce1a857856dad49037bf92595729ba9d462b42 (patch) | |
tree | eb982529bad1f9521386673d4a53cca15d8d4f96 | |
parent | 93c37d59b01326aa142520997ed4a6a4eef44648 (diff) | |
parent | f44190f2c4321f7ac07bf7dfaf2f3bf66985efe6 (diff) | |
download | googletest-ffce1a857856dad49037bf92595729ba9d462b42.zip googletest-ffce1a857856dad49037bf92595729ba9d462b42.tar.gz googletest-ffce1a857856dad49037bf92595729ba9d462b42.tar.bz2 |
Merge pull request #633 from plopresti/master
Fix missing-field-initializers GCC/Clang warning (issue 433).
-rw-r--r-- | googletest/include/gtest/internal/gtest-port.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index d570090..a8d81ff 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -1969,13 +1969,8 @@ class MutexBase { extern ::testing::internal::MutexBase mutex // Defines and statically (i.e. at link time) initializes a static mutex. -// The initialization list here does not explicitly initialize each field, -// instead relying on default initialization for the unspecified fields. In -// 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 } + ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false, pthread_t() } // The Mutex class can only be used for mutexes created at runtime. It // shares its API with MutexBase otherwise. |