You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/03/20 22:51:14 UTC
svn commit: r1303170 - in /incubator/mesos/trunk/src: common/factory.hpp
common/thread.hpp configurator/option.hpp detector/detector.cpp
master/master.cpp slave/slave.cpp slave/slave.hpp zookeeper/zookeeper.hpp
Author: benh
Date: Tue Mar 20 21:51:13 2012
New Revision: 1303170
URL: http://svn.apache.org/viewvc?rev=1303170&view=rev
Log:
Cleaned up issues found from turning on GCC warnings (contributed by Charles Reiss).
Modified:
incubator/mesos/trunk/src/common/factory.hpp
incubator/mesos/trunk/src/common/thread.hpp
incubator/mesos/trunk/src/configurator/option.hpp
incubator/mesos/trunk/src/detector/detector.cpp
incubator/mesos/trunk/src/master/master.cpp
incubator/mesos/trunk/src/slave/slave.cpp
incubator/mesos/trunk/src/slave/slave.hpp
incubator/mesos/trunk/src/zookeeper/zookeeper.hpp
Modified: incubator/mesos/trunk/src/common/factory.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/common/factory.hpp?rev=1303170&r1=1303169&r2=1303170&view=diff
==============================================================================
--- incubator/mesos/trunk/src/common/factory.hpp (original)
+++ incubator/mesos/trunk/src/common/factory.hpp Tue Mar 20 21:51:13 2012
@@ -82,6 +82,8 @@ namespace mesos { namespace internal { n
template<typename T, typename P> class Creator {
public:
virtual T * instantiate(P p) = 0;
+
+ virtual ~Creator() {}
};
Modified: incubator/mesos/trunk/src/common/thread.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/common/thread.hpp?rev=1303170&r1=1303169&r2=1303170&view=diff
==============================================================================
--- incubator/mesos/trunk/src/common/thread.hpp (original)
+++ incubator/mesos/trunk/src/common/thread.hpp Tue Mar 20 21:51:13 2012
@@ -18,6 +18,7 @@ void* __run(void* arg)
reinterpret_cast<std::tr1::function<void(void)>*>(arg);
(*function)();
delete function;
+ return 0;
}
Modified: incubator/mesos/trunk/src/configurator/option.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/configurator/option.hpp?rev=1303170&r1=1303169&r2=1303170&view=diff
==============================================================================
--- incubator/mesos/trunk/src/configurator/option.hpp (original)
+++ incubator/mesos/trunk/src/configurator/option.hpp Tue Mar 20 21:51:13 2012
@@ -39,6 +39,8 @@ public:
**/
virtual bool isValid(const std::string& val) const = 0;
+ virtual ~ValidatorBase() {}
+
protected:
template <class T>
bool isValidInternal(const std::string& val) const
Modified: incubator/mesos/trunk/src/detector/detector.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/detector/detector.cpp?rev=1303170&r1=1303169&r2=1303170&view=diff
==============================================================================
--- incubator/mesos/trunk/src/detector/detector.cpp (original)
+++ incubator/mesos/trunk/src/detector/detector.cpp Tue Mar 20 21:51:13 2012
@@ -141,12 +141,13 @@ MasterDetector* MasterDetector::create(c
bool contend,
bool quiet)
{
- if (url == "")
+ if (url == "") {
if (contend) {
return new BasicMasterDetector(pid);
} else {
fatal("cannot use specified url to detect master");
}
+ }
MasterDetector *detector = NULL;
Modified: incubator/mesos/trunk/src/master/master.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/master.cpp?rev=1303170&r1=1303169&r2=1303170&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/master.cpp (original)
+++ incubator/mesos/trunk/src/master/master.cpp Tue Mar 20 21:51:13 2012
@@ -124,6 +124,7 @@ struct SlaveRegistrar
// TODO(benh): Do a reverse lookup to ensure IP maps to
// hostname, or check credentials of this slave.
dispatch(master, &Master::addSlave, slave, false);
+ return true;
}
static bool run(Slave* slave,
@@ -159,6 +160,7 @@ struct SlaveReregistrar
// TODO(benh): Do a reverse lookup to ensure IP maps to
// hostname, or check credentials of this slave.
dispatch(master, &Master::readdSlave, slave, executorInfos, tasks);
+ return true;
}
static bool run(Slave* slave,
Modified: incubator/mesos/trunk/src/slave/slave.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/slave.cpp?rev=1303170&r1=1303169&r2=1303170&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/slave.cpp (original)
+++ incubator/mesos/trunk/src/slave/slave.cpp Tue Mar 20 21:51:13 2012
@@ -1483,6 +1483,8 @@ string Slave::createUniqueWorkDirectory(
out.str(prefix); // Try with prefix again.
}
}
+ LOG(FATAL) << "Could not create work directory for executor '" << executorId
+ << "' of framework" << frameworkId;
}
} // namespace slave {
Modified: incubator/mesos/trunk/src/slave/slave.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/slave.hpp?rev=1303170&r1=1303169&r2=1303170&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/slave.hpp (original)
+++ incubator/mesos/trunk/src/slave/slave.hpp Tue Mar 20 21:51:13 2012
@@ -233,6 +233,7 @@ struct Executor
launchedTasks[task.task_id()] = t;
resources += task.resources();
+ return t;
}
void removeTask(const TaskID& taskId)
Modified: incubator/mesos/trunk/src/zookeeper/zookeeper.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/zookeeper/zookeeper.hpp?rev=1303170&r1=1303169&r2=1303170&view=diff
==============================================================================
--- incubator/mesos/trunk/src/zookeeper/zookeeper.hpp (original)
+++ incubator/mesos/trunk/src/zookeeper/zookeeper.hpp Tue Mar 20 21:51:13 2012
@@ -55,7 +55,7 @@ public:
const std::string &path) = 0;
Watcher();
- ~Watcher();
+ virtual ~Watcher();
Watcher(const Watcher &that);
Watcher & operator = (const Watcher &that);
};