You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Benjamin Mahler (JIRA)" <ji...@apache.org> on 2014/11/17 19:45:33 UTC
[jira] [Resolved] (MESOS-2117) clock.cpp: control reaches end of
non-void function.
[ https://issues.apache.org/jira/browse/MESOS-2117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Mahler resolved MESOS-2117.
------------------------------------
Resolution: Fixed
[~benjaminhindman]: I pushed the following to unbreak the build:
{code}
commit 59215ad57906d379cef635348911c887903f4f31
Author: Benjamin Mahler <bm...@twitter.com>
Date: Mon Nov 17 10:43:56 2014 -0800
Added UNREACHABLE to Clock::settled to silence compiler warning.
diff --git a/3rdparty/libprocess/src/clock.cpp b/3rdparty/libprocess/src/clock.cpp
index 5623b58..dfe9ced 100644
--- a/3rdparty/libprocess/src/clock.cpp
+++ b/3rdparty/libprocess/src/clock.cpp
@@ -15,6 +15,7 @@
#include <stout/foreach.hpp>
#include <stout/lambda.hpp>
#include <stout/try.hpp>
+#include <stout/unreachable.hpp>
#include "synchronized.hpp"
@@ -418,6 +419,8 @@ bool Clock::settled()
VLOG(3) << "Clock is not settled";
return false;
}
+
+ UNREACHABLE();
}
{code}
> clock.cpp: control reaches end of non-void function.
> ----------------------------------------------------
>
> Key: MESOS-2117
> URL: https://issues.apache.org/jira/browse/MESOS-2117
> Project: Mesos
> Issue Type: Bug
> Components: build
> Reporter: Benjamin Mahler
>
> Caused by this code:
> {code}
> bool Clock::settled()
> {
> synchronized (timeouts) {
> CHECK(clock::paused);
> if (update_timer) {
> return false;
> } else if (clock::settling) {
> VLOG(3) << "Clock still not settled";
> return false;
> } else if (timeouts->size() == 0 ||
> timeouts->begin()->first > clock::current) {
> VLOG(3) << "Clock is settled";
> return true;
> }
> VLOG(3) << "Clock is not settled";
> return false;
> }
> }
> {code}
> {noformat}
> src/clock.cpp: In static member function 'static bool process::Clock::settled()':
> src/clock.cpp:421:1: warning: control reaches end of non-void function [-Wreturn-type]
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)