-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build fails for clang with -Werror #1521
Comments
I don't get the comment. What's wrong with adding |
use default constructor of pthread_t in order to initialize mutex
Compiling gtest with clang fails with -Wmissing-field-initializers as reported in [1] [1]: google/googletest#1521
Compiling gtest with clang fails with -Wmissing-field-initializers as reported in [1] [1]: google/googletest#1521
Compiling gtest with clang fails with -Wmissing-field-initializers as reported in [1] [1]: google/googletest#1521
A fix was added in #633 (which I think is in 1.8.0), but somehow the current master seems to be missing this patch, causing a warning (or in the above case, error) again. |
Master still isn't fixed. Made the change here and it worked: https://github.com/google/googletest/pull/633/files#diff-f21e2c91878df000cc7b8b316a89565c |
We stumbled on this: google/googletest#1521 So let's switch back to an older version of googletest, more specifically, one commit before: google/googletest@87a4cdd
…tain setups - address issue #206: ``` In file included from googletest/googletest/src/gtest-all.cc:42: googletest/googletest/src/gtest.cc:393:12: error: missing field 'owner_' initializer [-Werror,-Wmissing-field-initializers] GTEST_API_ GTEST_DEFINE_STATIC_MUTEX_(g_linked_ptr_mutex); ``` - this appears to be a problem described here google/googletest#1521 which remains unsolved as of today - another project on github addressed this issue temporarily (advancedtelematic/aktualizr#841) by checking out `googletest` one commit before this problem was introduced with commit google/googletest@87a4cdd, i.e, google/googletest@7888184
#1646 addressed that slightly differently |
@leissa is this still an issue? |
Works for me now. Thanks :) |
Catch missing imports and errors like google#1520 and google#1521
This regression must be introduced by one quite recent commit.
Same error using clang 5.0.0.
Removing
-Werror
fixes the build. However, I'd like to compile my projects withThe text was updated successfully, but these errors were encountered: