You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Benjamin Bannier <be...@mesosphere.io> on 2017/08/16 08:35:46 UTC

Review Request 61682: Fixed usage of 'ATOMIC_FLAG_INIT'.

-----------------------------------------------------------
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


Re: Review Request 61682: Fixed usage of 'ATOMIC_FLAG_INIT'.

Posted by Chun-Hung Hsiao <ch...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61682/#review183052
-----------------------------------------------------------


Ship it!




Ship It!

- Chun-Hung Hsiao


On Aug. 16, 2017, 8:35 a.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61682/
> -----------------------------------------------------------
> 
> (Updated Aug. 16, 2017, 8:35 a.m.)
> 
> 
> 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
> 
>


Re: Review Request 61682: Fixed usage of 'ATOMIC_FLAG_INIT'.

Posted by Jan Schlicht <ja...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61682/#review186387
-----------------------------------------------------------


Ship it!




Ship It!

- Jan Schlicht


On Aug. 16, 2017, 10:35 a.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61682/
> -----------------------------------------------------------
> 
> (Updated Aug. 16, 2017, 10:35 a.m.)
> 
> 
> 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
> 
>


Re: Review Request 61682: Fixed usage of 'ATOMIC_FLAG_INIT'.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61682/#review183026
-----------------------------------------------------------



Patch looks great!

Reviews applied: [61682]

Passed command: support\windows-build.bat

- Mesos Reviewbot Windows


On Aug. 16, 2017, 4:35 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61682/
> -----------------------------------------------------------
> 
> (Updated Aug. 16, 2017, 4:35 p.m.)
> 
> 
> 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
> 
>