diff options
author | Gennadiy Civil <misterg@google.com> | 2018-04-02 18:22:24 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-04-02 18:22:24 (GMT) |
commit | 87a4cdddd09515e39e4adecbe3d6897df8d089c1 (patch) | |
tree | e36fc472a9e71428f3f99bb4f03a60c04980a4c9 /googletest/include | |
parent | 7888184f28509dba839e3683409443e0b5bb8948 (diff) | |
download | googletest-87a4cdddd09515e39e4adecbe3d6897df8d089c1.zip googletest-87a4cdddd09515e39e4adecbe3d6897df8d089c1.tar.gz googletest-87a4cdddd09515e39e4adecbe3d6897df8d089c1.tar.bz2 |
merging gtest-port.h, again - 1refs/pull/1534/head
Diffstat (limited to 'googletest/include')
-rw-r--r-- | googletest/include/gtest/internal/gtest-port.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index e8cc5ae..c94ccdd 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -228,10 +228,9 @@ // // Regular expressions: // RE - a simple regular expression class using the POSIX -// Extended Regular Expression syntax on UNIX-like -// platforms, or a reduced regular exception syntax on -// other platforms, including Windows. -// +// Extended Regular Expression syntax on UNIX-like platforms +// or a reduced regular exception syntax on other +// platforms, including Windows. // Logging: // GTEST_LOG_() - logs messages at the specified severity level. // LogToStderr() - directs all log messages to stderr. @@ -2093,8 +2092,13 @@ 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, pthread_t() } + ::testing::internal::MutexBase mutex = { PTHREAD_MUTEX_INITIALIZER, false } // The Mutex class can only be used for mutexes created at runtime. It // shares its API with MutexBase otherwise. |