This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix build on clang 5 (#27178)
This contains two fixes, both related to new warnings introduced with clang 5: http://releases.llvm.org/5.0.0/tools/clang/docs/ReleaseNotes.html 1. clang 5 introduces a -Wzero-as-null-pointer-constant warning, which becomes an error with Werror. This warning is not known by older versions of clang and affects a lot of C/C++ code, such as: static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; It also affects code we pick up from our dependency libraries. Lets check if the compiler knows about this warning and disable it if so. 2. clang 5 introduces checks for casts. The library expects a `char *`, so lets cast our pointer to the expected type so it will continue working.
- Loading branch information