You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bb...@apache.org on 2017/11/27 14:11:08 UTC

mesos git commit: Made explicit that a 'switch' covers all branches.

Repository: mesos
Updated Branches:
  refs/heads/master 3c9aa7ab5 -> d007c590e


Made explicit that a 'switch' covers all branches.

Some compilers fail to recognize that the list of cases in this
'switch' statement is exhaustive. Added an explicit 'UNREACHABLE()' to
document to the compiler that we expect to have handled all possible
cases.

Review: https://reviews.apache.org/r/64084


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d007c590
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d007c590
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d007c590

Branch: refs/heads/master
Commit: d007c590e693d9937f1fd36a3db675d846324ab6
Parents: 3c9aa7a
Author: Benjamin Bannier <bb...@apache.org>
Authored: Mon Nov 27 14:58:08 2017 +0100
Committer: Benjamin Bannier <bb...@apache.org>
Committed: Mon Nov 27 14:58:53 2017 +0100

----------------------------------------------------------------------
 src/common/protobuf_utils.cpp | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/d007c590/src/common/protobuf_utils.cpp
----------------------------------------------------------------------
diff --git a/src/common/protobuf_utils.cpp b/src/common/protobuf_utils.cpp
index c1bd8b0..c0ff306 100644
--- a/src/common/protobuf_utils.cpp
+++ b/src/common/protobuf_utils.cpp
@@ -947,6 +947,8 @@ Try<Resources> getConsumedResources(const Offer::Operation& operation)
     case Offer::Operation::UNKNOWN:
       return Error("Unsupported operation");
   }
+
+  UNREACHABLE();
 }
 
 namespace slave {