Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
yangql
googletest
Commits
ffce1a85
Commit
ffce1a85
authored
Nov 24, 2015
by
Billy Donahue
Browse files
Merge pull request #633 from plopresti/master
Fix missing-field-initializers GCC/Clang warning (issue 433).
parents
93c37d59
f44190f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
googletest/include/gtest/internal/gtest-port.h
googletest/include/gtest/internal/gtest-port.h
+1
-6
No files found.
googletest/include/gtest/internal/gtest-port.h
View file @
ffce1a85
...
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment