-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61682/
-----------------------------------------------------------
Review request for mesos, Chun-Hung Hsiao and Jie Yu.
Repository: mesos
Description
-------
The C++ standard guarantees that the macro 'ATOMIC_FLAG_INIT' is
usable for initialization of atomic variables; its use in other
context is unspecified.
libcxx defines 'ATOMIC_FLAG_INIT' as '{false}' which when used in an
initializer list yields a clang warning,
warning: braces around scalar initializer [-Wbraced-scalar-init]
lock(ATOMIC_FLAG_INIT)
This patch prevents such a warning by initializing 'atomic_flag'
member variables in the class declaration instead of in an initializer
list.
Diffs
-----
3rdparty/libprocess/include/process/grpc.hpp
91c1cd9d6e3610e9978fae083fa75d781defa175
3rdparty/libprocess/src/grpc.cpp 3ba5bc5415d55d7be044cfc0f4e240358cb3f4e8
Diff: https://reviews.apache.org/r/61682/diff/1/
Testing
-------
With clang-6.0.0: `./configure --enable-grpc && make -C 3rdparty/libprocess
tests` emits no compiler warning.
Thanks,
Benjamin Bannier