Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: gcc uninitialized warnings triggered by unsafe_default_initialized
Despite all the `FOLLY_*_DISABLE_WARNING`, the implementation of `unsafe_default_initialized_cv` triggers hundreds of `-Wuninitialized` and `-Wmaybe-uninitialized` warnings when building with GCC 12, 13, 14. As much as I've tried, it seems impossible to silence the warnings purely by diagnostic pragmas. This change, however, eliminates all warnings, and the new code should otherwise have the exact same effect as before. At least, I can see that clang / gcc both produce identical code before and after this change when using `unsafe_default_initialized` to initialize variables.
- Loading branch information