mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <benjamin.bann...@mesosphere.io>
Subject Review Request 51041: Removed `default` case from `switch` over enum value.
Date Fri, 12 Aug 2016 16:47:19 GMT

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

Review request for mesos and Jie Yu.


Repository: mesos


Description
-------

Compilers can typically warn about enum values not handled in a
`switch`. If one adds a `default` case, even if the enum is extended
later, all cases will already be covered.

Instead do not use a `default` case so that we are warned whenever the
definition of the enum and our pattern matching against its value get
out of sync.


Diffs
-----

  src/linux/capabilities.cpp 5f21dd42dd94af907450aabb1900d1f73816b31c 

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


Testing
-------


Thanks,

Benjamin Bannier


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message