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 2016/12/02 10:48:29 UTC

Review Request 54304: Added explicit break statements in switch.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54304/
-----------------------------------------------------------

Review request for mesos and Benjamin Hindman.


Repository: mesos


Description
-------

The expectation here was that only one case would match so no
intentional fall-through would happen. Make this explicit by adding
break statements.

This was noted by coverity in CID 1396669.


Diffs
-----

  3rdparty/libprocess/include/process/address.hpp 01bc065b45ff1a4c38f245b49078cc06dbb11249 

Diff: https://reviews.apache.org/r/54304/diff/


Testing
-------

`make check` (OS X).

This is not expected to be a functional change.


Thanks,

Benjamin Bannier


Re: Review Request 54304: Added explicit break statements in switch.

Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54304/#review157879
-----------------------------------------------------------


Ship it!




Ship It!

- Benjamin Mahler


On Dec. 2, 2016, 10:48 a.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54304/
> -----------------------------------------------------------
> 
> (Updated Dec. 2, 2016, 10:48 a.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The expectation here was that only one case would match so no
> intentional fall-through would happen. Make this explicit by adding
> break statements.
> 
> This was noted by coverity in CID 1396669.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/address.hpp 01bc065b45ff1a4c38f245b49078cc06dbb11249 
> 
> Diff: https://reviews.apache.org/r/54304/diff/
> 
> 
> Testing
> -------
> 
> `make check` (OS X).
> 
> This is not expected to be a functional change.
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


Re: Review Request 54304: Added explicit break statements in switch.

Posted by Benjamin Mahler <bm...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54304/#review157816
-----------------------------------------------------------




3rdparty/libprocess/include/process/address.hpp (lines 358 - 371)
<https://reviews.apache.org/r/54304/#comment228418>

    Is it possible to do something more like:
    
    ```
     {
       switch (address.family()) {
         case Address::Family::INET: {
           return stream << inet::Address(address.sockaddr.in);
         }
     #ifndef __WINDOWS__
         case Address::Family::UNIX: {
          return stream << unix::Address(address.sockaddr.un);
         }
     #endif // __WINDOWS__
       }
     }
    ```


- Benjamin Mahler


On Dec. 2, 2016, 10:48 a.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54304/
> -----------------------------------------------------------
> 
> (Updated Dec. 2, 2016, 10:48 a.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The expectation here was that only one case would match so no
> intentional fall-through would happen. Make this explicit by adding
> break statements.
> 
> This was noted by coverity in CID 1396669.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/address.hpp 01bc065b45ff1a4c38f245b49078cc06dbb11249 
> 
> Diff: https://reviews.apache.org/r/54304/diff/
> 
> 
> Testing
> -------
> 
> `make check` (OS X).
> 
> This is not expected to be a functional change.
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


Re: Review Request 54304: Added explicit break statements in switch.

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



Patch looks great!

Reviews applied: [54304]

Passed command: export OS='ubuntu:14.04' BUILDTOOL='autotools' COMPILER='gcc' CONFIGURATION='--verbose' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh

- Mesos ReviewBot


On Dec. 2, 2016, 10:48 a.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54304/
> -----------------------------------------------------------
> 
> (Updated Dec. 2, 2016, 10:48 a.m.)
> 
> 
> Review request for mesos and Benjamin Hindman.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The expectation here was that only one case would match so no
> intentional fall-through would happen. Make this explicit by adding
> break statements.
> 
> This was noted by coverity in CID 1396669.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/address.hpp 01bc065b45ff1a4c38f245b49078cc06dbb11249 
> 
> Diff: https://reviews.apache.org/r/54304/diff/
> 
> 
> Testing
> -------
> 
> `make check` (OS X).
> 
> This is not expected to be a functional change.
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>