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/08/25 00:01:23 UTC

svn commit: r1377133 - in /incubator/mesos/trunk: src/ src/common/ src/configurator/ src/examples/ src/exec/ src/java/jni/ src/jvm/ src/launcher/ src/local/ src/log/ src/master/ src/sched/ src/slave/ src/state/ src/tests/ src/webui/ src/zookeeper/ thir...

Author: benh
Date: Fri Aug 24 22:01:21 2012
New Revision: 1377133

URL: http://svn.apache.org/viewvc?rev=1377133&view=rev
Log:
Enables -Wall -Werror for building (contributed by Ben Mahler,
https://reviews.apache.org/r/6499).

Modified:
    incubator/mesos/trunk/src/Makefile.am
    incubator/mesos/trunk/src/common/attributes.cpp
    incubator/mesos/trunk/src/common/resources.cpp
    incubator/mesos/trunk/src/common/values.cpp
    incubator/mesos/trunk/src/configurator/configurator.cpp
    incubator/mesos/trunk/src/configurator/option.hpp
    incubator/mesos/trunk/src/examples/balloon_framework.cpp
    incubator/mesos/trunk/src/examples/long_lived_framework.cpp
    incubator/mesos/trunk/src/examples/no_executor_framework.cpp
    incubator/mesos/trunk/src/examples/test_framework.cpp
    incubator/mesos/trunk/src/exec/exec.cpp
    incubator/mesos/trunk/src/java/jni/convert.cpp
    incubator/mesos/trunk/src/jvm/jvm.cpp
    incubator/mesos/trunk/src/launcher/launcher.cpp
    incubator/mesos/trunk/src/local/local.cpp
    incubator/mesos/trunk/src/log/coordinator.cpp
    incubator/mesos/trunk/src/log/coordinator.hpp
    incubator/mesos/trunk/src/log/log.hpp
    incubator/mesos/trunk/src/master/constants.hpp
    incubator/mesos/trunk/src/master/master.cpp
    incubator/mesos/trunk/src/master/master.hpp
    incubator/mesos/trunk/src/sched/sched.cpp
    incubator/mesos/trunk/src/slave/slave.cpp
    incubator/mesos/trunk/src/slave/slave.hpp
    incubator/mesos/trunk/src/state/serializer.hpp
    incubator/mesos/trunk/src/tests/allocator_tests.cpp
    incubator/mesos/trunk/src/tests/attributes_tests.cpp
    incubator/mesos/trunk/src/tests/exception_tests.cpp
    incubator/mesos/trunk/src/tests/fault_tolerance_tests.cpp
    incubator/mesos/trunk/src/tests/flags_tests.cpp
    incubator/mesos/trunk/src/tests/gc_tests.cpp
    incubator/mesos/trunk/src/tests/log_tests.cpp
    incubator/mesos/trunk/src/tests/master_tests.cpp
    incubator/mesos/trunk/src/tests/multihashmap_tests.cpp
    incubator/mesos/trunk/src/tests/resource_offers_tests.cpp
    incubator/mesos/trunk/src/tests/resources_tests.cpp
    incubator/mesos/trunk/src/tests/sorter_tests.cpp
    incubator/mesos/trunk/src/tests/stout_tests.cpp
    incubator/mesos/trunk/src/tests/utils.hpp
    incubator/mesos/trunk/src/tests/zookeeper_tests.cpp
    incubator/mesos/trunk/src/webui/webui.cpp
    incubator/mesos/trunk/src/zookeeper/group.cpp
    incubator/mesos/trunk/src/zookeeper/url.hpp
    incubator/mesos/trunk/src/zookeeper/zookeeper.cpp
    incubator/mesos/trunk/third_party/libprocess/include/process/protobuf.hpp
    incubator/mesos/trunk/third_party/libprocess/include/stout/cache.hpp
    incubator/mesos/trunk/third_party/libprocess/include/stout/os.hpp
    incubator/mesos/trunk/third_party/libprocess/include/stout/strings.hpp
    incubator/mesos/trunk/third_party/libprocess/include/stout/time.hpp

Modified: incubator/mesos/trunk/src/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/Makefile.am?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/Makefile.am (original)
+++ incubator/mesos/trunk/src/Makefile.am Fri Aug 24 22:01:21 2012
@@ -77,6 +77,7 @@ AM_LIBS = $(PTHREAD_LIBS)
 
 # Setup CPPFLAGS that are used for most source files.
 MESOS_CPPFLAGS = $(AM_CPPFLAGS)
+MESOS_CPPFLAGS += -Wall -Werror
 MESOS_CPPFLAGS += -DMESOS_WEBUI_DIR=\"$(webuidir)/webui\"
 MESOS_CPPFLAGS += -DMESOS_LIBEXECDIR=\"$(pkglibexecdir)\"
 MESOS_CPPFLAGS += -I$(top_srcdir)/include

Modified: incubator/mesos/trunk/src/common/attributes.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/common/attributes.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/common/attributes.cpp (original)
+++ incubator/mesos/trunk/src/common/attributes.cpp Fri Aug 24 22:01:21 2012
@@ -74,7 +74,7 @@ Attributes Attributes::parse(const strin
 
   vector<string> tokens = strings::split(s, ";\n");
 
-  for (int i = 0; i < tokens.size(); i++) {
+  for (size_t i = 0; i < tokens.size(); i++) {
     const vector<string>& pairs = strings::split(tokens[i], ":");
     if (pairs.size() != 2) {
       LOG(FATAL) << "Bad value for attributes, missing ':' within " << pairs[0];

Modified: incubator/mesos/trunk/src/common/resources.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/common/resources.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/common/resources.cpp (original)
+++ incubator/mesos/trunk/src/common/resources.cpp Fri Aug 24 22:01:21 2012
@@ -216,7 +216,7 @@ Resources Resources::parse(const string&
 
   vector<string> tokens = strings::split(s, ";\n");
 
-  for (int i = 0; i < tokens.size(); i++) {
+  for (size_t i = 0; i < tokens.size(); i++) {
     const vector<string>& pairs = strings::split(tokens[i], ":");
     if (pairs.size() != 2) {
       LOG(FATAL) << "Bad value for resources, missing ':' within " << pairs[0];

Modified: incubator/mesos/trunk/src/common/values.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/common/values.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/common/values.cpp (original)
+++ incubator/mesos/trunk/src/common/values.cpp Fri Aug 24 22:01:21 2012
@@ -73,7 +73,7 @@ Try<Value> parse(const std::string& text
       return Try<Value>::error("Error parsing value: " + text +
                                ", expect one or more \"ranges \"");
     } else {
-      for (int i = 0; i < tokens.size(); i += 2) {
+      for (size_t i = 0; i < tokens.size(); i += 2) {
         Value::Range *range = ranges.add_range();
 
         int j = i;
@@ -97,7 +97,7 @@ Try<Value> parse(const std::string& text
       // This is a set.
       Value::Set set;
       const vector<string>& tokens = strings::split(temp, "{},\n");
-      for (int i = 0; i < tokens.size(); i++) {
+      for (size_t i = 0; i < tokens.size(); i++) {
         set.add_item(tokens[i]);
       }
 

Modified: incubator/mesos/trunk/src/configurator/configurator.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/configurator/configurator.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/configurator/configurator.cpp (original)
+++ incubator/mesos/trunk/src/configurator/configurator.cpp Fri Aug 24 22:01:21 2012
@@ -161,15 +161,15 @@ void Configurator::loadCommandLine(int a
   // key multiple times (since right now we only use the first value)
   map<string, int> timesSeen;
 
-  for (int i = 0; i < args.size(); i++) {
+  for (size_t i = 0; i < args.size(); i++) {
     string key, val;
     bool set = false;
-    if (args[i].find("--", 0) == 0) { 
+    if (args[i].find("--", 0) == 0) {
       // handle "--" case
       size_t eq = args[i].find_first_of("=");
-      if (eq == string::npos && 
+      if (eq == string::npos &&
           args[i].find("--no-", 0) == 0) { // handle --no-blah
-        key = args[i].substr(5); 
+        key = args[i].substr(5);
         val = "0";
         set = true;
         checkCommandLineParamFormat(key, true);
@@ -283,7 +283,7 @@ string Configurator::getUsage() const 
   string usage;
 
   map<string,string> col1; // key -> col 1 string
-  int maxLen = 0;
+  size_t maxLen = 0;
 
   // construct string for the first column and get size of column
   foreachpair (const string& key, const ConfigOption& opt, options) {

Modified: incubator/mesos/trunk/src/configurator/option.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/configurator/option.hpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/configurator/option.hpp (original)
+++ incubator/mesos/trunk/src/configurator/option.hpp Fri Aug 24 22:01:21 2012
@@ -117,9 +117,9 @@ public:
   ConfigOption(const ConfigOption& opt)
     : helpString(opt.helpString),
       hasDefault(opt.hasDefault),
+      defaultValue(opt.defaultValue),
       hasShortName(opt.hasShortName),
-      shortName(opt.shortName),
-      defaultValue(opt.defaultValue)
+      shortName(opt.shortName)
   {
     validator = (opt.validator == NULL) ? NULL : opt.validator->clone();
   }

Modified: incubator/mesos/trunk/src/examples/balloon_framework.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/examples/balloon_framework.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/examples/balloon_framework.cpp (original)
+++ incubator/mesos/trunk/src/examples/balloon_framework.cpp Fri Aug 24 22:01:21 2012
@@ -73,7 +73,7 @@ public:
   {
     std::cout << "Resource offers received" << std::endl;
 
-    for (int i = 0; i < offers.size(); i++) {
+    for (size_t i = 0; i < offers.size(); i++) {
       const Offer& offer = offers[i];
 
       // We just launch one task.

Modified: incubator/mesos/trunk/src/examples/long_lived_framework.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/examples/long_lived_framework.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/examples/long_lived_framework.cpp (original)
+++ incubator/mesos/trunk/src/examples/long_lived_framework.cpp Fri Aug 24 22:01:21 2012
@@ -63,7 +63,7 @@ public:
                               const vector<Offer>& offers)
   {
     cout << "." << flush;
-    for (int i = 0; i < offers.size(); i++) {
+    for (size_t i = 0; i < offers.size(); i++) {
       const Offer& offer = offers[i];
 
       // Lookup resources we care about.

Modified: incubator/mesos/trunk/src/examples/no_executor_framework.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/examples/no_executor_framework.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/examples/no_executor_framework.cpp (original)
+++ incubator/mesos/trunk/src/examples/no_executor_framework.cpp Fri Aug 24 22:01:21 2012
@@ -62,7 +62,7 @@ public:
                               const vector<Offer>& offers)
   {
     cout << "." << flush;
-    for (int i = 0; i < offers.size(); i++) {
+    for (size_t i = 0; i < offers.size(); i++) {
       const Offer& offer = offers[i];
 
       // Lookup resources we care about.

Modified: incubator/mesos/trunk/src/examples/test_framework.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/examples/test_framework.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/examples/test_framework.cpp (original)
+++ incubator/mesos/trunk/src/examples/test_framework.cpp Fri Aug 24 22:01:21 2012
@@ -65,7 +65,7 @@ public:
                               const vector<Offer>& offers)
   {
     cout << "." << flush;
-    for (int i = 0; i < offers.size(); i++) {
+    for (size_t i = 0; i < offers.size(); i++) {
       const Offer& offer = offers[i];
 
       // Lookup resources we care about.

Modified: incubator/mesos/trunk/src/exec/exec.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/exec/exec.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/exec/exec.cpp (original)
+++ incubator/mesos/trunk/src/exec/exec.cpp Fri Aug 24 22:01:21 2012
@@ -317,7 +317,9 @@ private:
 
 
 MesosExecutorDriver::MesosExecutorDriver(Executor* _executor)
-  : executor(_executor), status(DRIVER_NOT_STARTED), process(NULL)
+  : executor(_executor),
+    process(NULL),
+    status(DRIVER_NOT_STARTED)
 {
   GOOGLE_PROTOBUF_VERIFY_VERSION;
 

Modified: incubator/mesos/trunk/src/java/jni/convert.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/java/jni/convert.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/java/jni/convert.cpp (original)
+++ incubator/mesos/trunk/src/java/jni/convert.cpp Fri Aug 24 22:01:21 2012
@@ -67,7 +67,7 @@ jclass FindMesosClass(JNIEnv* env, const
   // ClassLoader.loadClass uses the dotted "binary name"
   // format. Convert formats.
   string convName = className;
-  for (int i = 0; i < convName.size(); i++) {
+  for (uint32_t i = 0; i < convName.size(); i++) {
     if (convName[i] == '/')
       convName[i] = '.';
   }

Modified: incubator/mesos/trunk/src/jvm/jvm.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/jvm/jvm.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/jvm/jvm.cpp (original)
+++ incubator/mesos/trunk/src/jvm/jvm.cpp Fri Aug 24 22:01:21 2012
@@ -467,9 +467,7 @@ double Jvm::getStaticField<double>(const
 
 
 Jvm::Jvm(const std::vector<std::string>& options, JNIVersion jniVersion)
-  : jvm(NULL),
-    env(NULL),
-    voidClass("V"),
+  : voidClass("V"),
     booleanClass("Z"),
     byteClass("B"),
     charClass("C"),
@@ -478,14 +476,16 @@ Jvm::Jvm(const std::vector<std::string>&
     longClass("J"),
     floatClass("F"),
     doubleClass("D"),
-    stringClass(JClass::forName("java/lang/String"))
+    stringClass(JClass::forName("java/lang/String")),
+    jvm(NULL),
+    env(NULL)
 {
   JavaVMInitArgs vmArgs;
   vmArgs.version = jniVersion;
   vmArgs.ignoreUnrecognized = false;
 
   JavaVMOption* opts = new JavaVMOption[options.size()];
-  for (int i = 0; i < options.size(); i++) {
+  for (size_t i = 0; i < options.size(); i++) {
     opts[i].optionString = const_cast<char*>(options[i].c_str());
   }
   vmArgs.nOptions = options.size();

Modified: incubator/mesos/trunk/src/launcher/launcher.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/launcher/launcher.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/launcher/launcher.cpp (original)
+++ incubator/mesos/trunk/src/launcher/launcher.cpp Fri Aug 24 22:01:21 2012
@@ -124,8 +124,10 @@ int ExecutorLauncher::run()
   // Execute the command (via '/bin/sh -c command').
   execl("/bin/sh", "sh", "-c", command.c_str(), (char*) NULL);
 
-  // If we get here, the execv call failedl
+  // If we get here, the execv call failed.
   fatalerror("Could not execute '/bin/sh -c %s'", command.c_str());
+
+  return -1; // Silence end of non-void function warning.
 }
 
 

Modified: incubator/mesos/trunk/src/local/local.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/local/local.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/local/local.cpp (original)
+++ incubator/mesos/trunk/src/local/local.cpp Fri Aug 24 22:01:21 2012
@@ -88,7 +88,6 @@ PID<Master> launch(int numSlaves,
 PID<Master> launch(const Configuration& configuration, AllocatorProcess* _allocator)
 {
   int numSlaves = configuration.get<int>("num_slaves", 1);
-  bool quiet = configuration.get<bool>("quiet", false);
 
   if (master != NULL) {
     LOG(FATAL) << "Can only launch one local cluster at a time (for now)";

Modified: incubator/mesos/trunk/src/log/coordinator.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/log/coordinator.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/log/coordinator.cpp (original)
+++ incubator/mesos/trunk/src/log/coordinator.cpp Fri Aug 24 22:01:21 2012
@@ -80,7 +80,7 @@ Result<uint64_t> Coordinator::elect(cons
   set<Future<PromiseResponse> > futures =
     broadcast(protocol::promise, request);
 
-  int okays = 0;
+  uint32_t okays = 0;
 
   do {
     Future<Future<PromiseResponse> > future = select(futures);
@@ -265,7 +265,7 @@ Result<uint64_t> Coordinator::write(
   set<Future<WriteResponse> > futures =
     remotecast(protocol::write, request);
 
-  int okays = 0;
+  uint32_t okays = 0;
 
   do {
     Future<Future<WriteResponse> > future = select(futures);

Modified: incubator/mesos/trunk/src/log/coordinator.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/log/coordinator.hpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/log/coordinator.hpp (original)
+++ incubator/mesos/trunk/src/log/coordinator.hpp Fri Aug 24 22:01:21 2012
@@ -99,7 +99,7 @@ private:
 
   bool elected; // True if this coordinator has been elected.
 
-  const int quorum; // Quorum size.
+  const uint32_t quorum; // Quorum size.
 
   Replica* replica; // Local log replica.
 

Modified: incubator/mesos/trunk/src/log/log.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/log/log.hpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/log/log.hpp (original)
+++ incubator/mesos/trunk/src/log/log.hpp Fri Aug 24 22:01:21 2012
@@ -338,8 +338,8 @@ Log::Position Log::Reader::ending()
 
 
 Log::Writer::Writer(Log* log, const seconds& timeout, int retries)
-  : coordinator(log->quorum, log->replica, log->network),
-    error(Option<std::string>::none())
+  : error(Option<std::string>::none()),
+    coordinator(log->quorum, log->replica, log->network)
 {
   do {
     Result<uint64_t> result = coordinator.elect(Timeout(timeout.value));

Modified: incubator/mesos/trunk/src/master/constants.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/constants.hpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/constants.hpp (original)
+++ incubator/mesos/trunk/src/master/constants.hpp Fri Aug 24 22:01:21 2012
@@ -30,33 +30,33 @@ namespace master {
 const int MAX_OFFERS_PER_FRAMEWORK = 50;
 
 // Minimum number of cpus / task.
-const int32_t MIN_CPUS = 1;
+const uint32_t MIN_CPUS = 1;
 
 // Minimum amount of memory / task.
-const int32_t MIN_MEM = 32 * Megabyte;
+const uint32_t MIN_MEM = 32 * Megabyte;
 
 // Maximum number of CPUs per machine.
-const int32_t MAX_CPUS = 1000 * 1000;
+const uint32_t MAX_CPUS = 1000 * 1000;
 
 // Maximum amount of memory / machine.
-const int32_t MAX_MEM = 1024 * 1024 * Megabyte;
+const uint32_t MAX_MEM = 1024 * 1024 * Megabyte;
 
 // Acceptable timeout for slave PING.
 const double SLAVE_PING_TIMEOUT = 15.0;
 
 // Maximum number of ping timeouts until slave is considered failed.
-const int MAX_SLAVE_PING_TIMEOUTS = 5;
+const uint32_t MAX_SLAVE_PING_TIMEOUTS = 5;
 
 // Maximum number of completed frameworks to store in the cache.
 // TODO(thomasm): Make configurable.
-const int MAX_COMPLETED_FRAMEWORKS = 100;
+const uint32_t MAX_COMPLETED_FRAMEWORKS = 100;
 
 // Maximum number of completed tasks per framework to store in the
 // cache.  TODO(thomasm): Make configurable.
-const int MAX_COMPLETED_TASKS_PER_FRAMEWORK = 500;
+const uint32_t MAX_COMPLETED_TASKS_PER_FRAMEWORK = 500;
 
 // Time interval to check for updated watchers list.
-const int WATCH_TIMEOUT = 5;
+const uint32_t WATCH_TIMEOUT = 5;
 
 } // namespace mesos {
 } // namespace internal {

Modified: incubator/mesos/trunk/src/master/master.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/master.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/master.cpp (original)
+++ incubator/mesos/trunk/src/master/master.cpp Fri Aug 24 22:01:21 2012
@@ -113,8 +113,8 @@ protected:
   }
 
 private:
-  AllocatorProcess* allocator;
   const string path;
+  AllocatorProcess* allocator;
   Option<hashset<string> > lastWhitelist;
 };
 
@@ -176,7 +176,7 @@ private:
   const SlaveInfo slaveInfo;
   const SlaveID slaveId;
   const PID<Master> master;
-  int timeouts;
+  uint32_t timeouts;
   bool pinged;
 };
 
@@ -257,17 +257,15 @@ struct SlaveReregistrar
 
 Master::Master(AllocatorProcess* _allocator)
   : ProcessBase("master"),
-    allocator(_allocator),
-    flags()
-{}
+    flags(),
+    allocator(_allocator) {}
 
 
 Master::Master(AllocatorProcess* _allocator,
                const flags::Flags<logging::Flags, master::Flags>& _flags)
   : ProcessBase("master"),
-    allocator(_allocator),
-    flags(_flags)
-{}
+    flags(_flags),
+    allocator(_allocator) {}
 
 
 Master::~Master()
@@ -669,7 +667,7 @@ void Master::reregisterFramework(const F
     // TODO(benh): Check for root submissions like above!
 
     // Add any running tasks reported by slaves for this framework.
-    foreachpair (const SlaveID& slaveId, Slave* slave, slaves) {
+    foreachvalue (Slave* slave, slaves) {
       foreachvalue (Task* task, slave->tasks) {
         if (framework->id == task->framework_id()) {
           framework->addTask(task);

Modified: incubator/mesos/trunk/src/master/master.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/master/master.hpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/master/master.hpp (original)
+++ incubator/mesos/trunk/src/master/master.hpp Fri Aug 24 22:01:21 2012
@@ -244,11 +244,12 @@ struct Slave
         const SlaveID& _id,
         const UPID& _pid,
         double time)
-    : info(_info),
-      id(_id),
+    : id(_id),
+      info(_info),
       pid(_pid),
       registeredTime(time),
-      lastHeartbeat(time) {}
+      lastHeartbeat(time),
+      observer(NULL) {}
 
   ~Slave() {}
 
@@ -377,8 +378,8 @@ struct Framework
             const FrameworkID& _id,
             const UPID& _pid,
             double time)
-    : info(_info),
-      id(_id),
+    : id(_id),
+      info(_info),
       pid(_pid),
       active(true),
       registeredTime(time),

Modified: incubator/mesos/trunk/src/sched/sched.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/sched/sched.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/sched/sched.cpp (original)
+++ incubator/mesos/trunk/src/sched/sched.cpp Fri Aug 24 22:01:21 2012
@@ -97,8 +97,8 @@ public:
       url(_url),
       mutex(_mutex),
       cond(_cond),
-      master(UPID()),
       failover(_framework.has_id() && !framework.id().value().empty()),
+      master(UPID()),
       connected(false),
       aborted(false),
       // TODO(benh): Add Try().
@@ -281,7 +281,7 @@ protected:
 
     // Save the pid associated with each slave (one per offer) so
     // later we can send framework messages directly.
-    for (int i = 0; i < offers.size(); i++) {
+    for (size_t i = 0; i < offers.size(); i++) {
       UPID pid(pids[i]);
       // Check if parse failed (e.g., due to DNS).
       if (pid != UPID()) {

Modified: incubator/mesos/trunk/src/slave/slave.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/slave.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/slave.cpp (original)
+++ incubator/mesos/trunk/src/slave/slave.cpp Fri Aug 24 22:01:21 2012
@@ -94,11 +94,10 @@ Slave::Slave(const Resources& _resources
              bool _local,
              IsolationModule* _isolationModule)
   : ProcessBase(ID::generate("slave")),
-    resources(_resources),
+    flags(),
     local(_local),
-    isolationModule(_isolationModule),
-    flags()
-{}
+    resources(_resources),
+    isolationModule(_isolationModule) {}
 
 
 Slave::Slave(const flags::Flags<logging::Flags, slave::Flags>& _flags,

Modified: incubator/mesos/trunk/src/slave/slave.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/slave/slave.hpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/slave/slave.hpp (original)
+++ incubator/mesos/trunk/src/slave/slave.hpp Fri Aug 24 22:01:21 2012
@@ -211,10 +211,10 @@ struct Executor
   Executor(const FrameworkID& _frameworkId,
            const ExecutorInfo& _info,
            const std::string& _directory)
-    : frameworkId(_frameworkId),
+    : id(_info.executor_id()),
       info(_info),
+      frameworkId(_frameworkId),
       directory(_directory),
-      id(_info.executor_id()),
       uuid(UUID::random()),
       pid(UPID()),
       shutdown(false),

Modified: incubator/mesos/trunk/src/state/serializer.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/state/serializer.hpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/state/serializer.hpp (original)
+++ incubator/mesos/trunk/src/state/serializer.hpp Fri Aug 24 22:01:21 2012
@@ -35,7 +35,7 @@ struct ProtobufSerializer
   static Try<T> deserialize(const std::string& value)
   {
     T t;
-    const google::protobuf::Message* message = &t; // Check T is a protobuf.
+    (void)static_cast<google::protobuf::Message*>(&t);
 
     google::protobuf::io::ArrayInputStream stream(value.data(), value.size());
     if (!t.ParseFromZeroCopyStream(&stream)) {

Modified: incubator/mesos/trunk/src/tests/allocator_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/allocator_tests.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/allocator_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/allocator_tests.cpp Fri Aug 24 22:01:21 2012
@@ -57,6 +57,22 @@ using testing::Return;
 using testing::SaveArg;
 
 
+void checkResources(vector<Offer> offers, int cpus, int mem)
+{
+  EXPECT_EQ(1u, offers.size());
+
+  EXPECT_EQ(2, offers[0].resources().size());
+
+  foreach (const Resource& resource, offers[0].resources()) {
+    if (resource.name() == "cpus") {
+      EXPECT_EQ(resource.scalar().value(), cpus);
+    } else if (resource.name() == "mem") {
+      EXPECT_EQ(resource.scalar().value(), mem);
+    }
+  }
+}
+
+
 TEST(AllocatorTest, DRFAllocatorProcess)
 {
   FrameworkInfo frameworkInfo1;

Modified: incubator/mesos/trunk/src/tests/attributes_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/attributes_tests.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/attributes_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/attributes_tests.cpp Fri Aug 24 22:01:21 2012
@@ -41,10 +41,10 @@ TEST(AttributesTest, Parsing)
   ASSERT_EQ(Value::RANGES, a.get(1).type());
   ASSERT_EQ("ports", a.get(1).name());
   ASSERT_EQ(2, a.get(1).ranges().range_size());
-  ASSERT_EQ(10000, a.get(1).ranges().range(0).begin());
-  ASSERT_EQ(20000, a.get(1).ranges().range(0).end());
-  ASSERT_EQ(30000, a.get(1).ranges().range(1).begin());
-  ASSERT_EQ(50000, a.get(1).ranges().range(1).end());
+  ASSERT_EQ(10000u, a.get(1).ranges().range(0).begin());
+  ASSERT_EQ(20000u, a.get(1).ranges().range(0).end());
+  ASSERT_EQ(30000u, a.get(1).ranges().range(1).begin());
+  ASSERT_EQ(50000u, a.get(1).ranges().range(1).end());
 
 
   ASSERT_EQ(Value::TEXT, a.get(2).type());

Modified: incubator/mesos/trunk/src/tests/exception_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/exception_tests.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/exception_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/exception_tests.cpp Fri Aug 24 22:01:21 2012
@@ -189,15 +189,15 @@ TEST(ExceptionTest, DisallowSchedulerCal
                     Return(false)));
 
   EXPECT_MESSAGE(filter, Eq(RescindResourceOfferMessage().GetTypeName()), _, _)
-    .WillOnce(Trigger(&rescindMsg));
+    .WillOnce(DoAll(Trigger(&rescindMsg), Return(false)));
 
   EXPECT_MESSAGE(filter, Eq(UnregisterFrameworkMessage().GetTypeName()), _, _)
-      .WillOnce(Trigger(&unregisterMsg));
+      .WillOnce(DoAll(Trigger(&unregisterMsg), Return(false)));
 
   driver.start();
 
   WAIT_UNTIL(resourceOffersCall);
-  EXPECT_NE(0, offers.size());
+  EXPECT_NE(0u, offers.size());
 
 
   ASSERT_EQ(DRIVER_ABORTED, driver.abort());

Modified: incubator/mesos/trunk/src/tests/fault_tolerance_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/fault_tolerance_tests.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/fault_tolerance_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/fault_tolerance_tests.cpp Fri Aug 24 22:01:21 2012
@@ -100,7 +100,7 @@ TEST(FaultToleranceTest, SlaveLost)
 
   WAIT_UNTIL(resourceOffersCall);
 
-  EXPECT_EQ(1, offers.size());
+  EXPECT_EQ(1u, offers.size());
 
   trigger offerRescindedCall, slaveLostCall;
 
@@ -137,7 +137,7 @@ TEST(FaultToleranceTest, SlavePartitione
   EXPECT_MESSAGE(filter, _, _, _)
     .WillRepeatedly(Return(false));
 
-  int pings = 0;
+  uint32_t pings = 0;
 
   // Set these expectations up before we spawn the slave (in
   // local::launch) so that we don't miss the first PING.
@@ -176,7 +176,7 @@ TEST(FaultToleranceTest, SlavePartitione
 
   // Now advance through the PINGs.
   do {
-    int count = pings;
+    uint32_t count = pings;
     Clock::advance(master::SLAVE_PING_TIMEOUT);
     WAIT_UNTIL(pings == count + 1);
   } while (pings < master::MAX_SLAVE_PING_TIMEOUTS);
@@ -455,7 +455,7 @@ TEST(FaultToleranceTest, DISABLED_TaskLo
   NoMasterDetectedMessage noMasterDetectedMsg;
   process::post(message.to, noMasterDetectedMsg);
 
-  EXPECT_NE(0, offers.size());
+  EXPECT_NE(0u, offers.size());
 
   TaskInfo task;
   task.set_name("test task");
@@ -561,7 +561,7 @@ TEST(FaultToleranceTest, SchedulerFailov
 
   WAIT_UNTIL(resourceOffersCall);
 
-  EXPECT_NE(0, offers.size());
+  EXPECT_NE(0u, offers.size());
 
   TaskInfo task;
   task.set_name("");
@@ -686,7 +686,7 @@ TEST(FaultToleranceTest, SchedulerFailov
 
   WAIT_UNTIL(sched1ResourceOfferCall);
 
-  EXPECT_NE(0, offers.size());
+  EXPECT_NE(0u, offers.size());
 
   TaskInfo task;
   task.set_name("");
@@ -814,7 +814,7 @@ TEST(FaultToleranceTest, SchedulerExit)
 
   WAIT_UNTIL(schedResourceOfferCall);
 
-  EXPECT_NE(0, offers.size());
+  EXPECT_NE(0u, offers.size());
 
   TaskInfo task;
   task.set_name("");

Modified: incubator/mesos/trunk/src/tests/flags_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/flags_tests.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/flags_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/flags_tests.cpp Fri Aug 24 22:01:21 2012
@@ -162,12 +162,12 @@ TEST(FlagsTest, Configurator)
   int argc = 6;
   char* argv[argc];
 
-  argv[0] = "/path/to/program";
-  argv[1] = "--name1=billy joel";
-  argv[2] = "--name2=43";
-  argv[3] = "--no-name3";
-  argv[4] = "--no-name4";
-  argv[5] = "--name5";
+  argv[0] = (char*) "/path/to/program";
+  argv[1] = (char*) "--name1=billy joel";
+  argv[2] = (char*) "--name2=43";
+  argv[3] = (char*) "--no-name3";
+  argv[4] = (char*) "--no-name4";
+  argv[5] = (char*) "--name5";
 
   mesos::internal::Configurator configurator(flags);
   mesos::internal::Configuration configuration;

Modified: incubator/mesos/trunk/src/tests/gc_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/gc_tests.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/gc_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/gc_tests.cpp Fri Aug 24 22:01:21 2012
@@ -143,7 +143,7 @@ protected:
   // Launches a task based on the received offer.
   void launchTask(const ExecutorInfo& executorInfo)
   {
-    EXPECT_NE(0, offers.size());
+    EXPECT_NE(0u, offers.size());
 
     TaskInfo task;
     task.set_name("");

Modified: incubator/mesos/trunk/src/tests/log_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/log_tests.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/log_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/log_tests.cpp Fri Aug 24 22:01:21 2012
@@ -70,9 +70,9 @@ TEST(ReplicaTest, Promise)
 
   response = future.get();
   EXPECT_TRUE(response.okay());
-  EXPECT_EQ(2, response.id());
+  EXPECT_EQ(2u, response.id());
   EXPECT_TRUE(response.has_position());
-  EXPECT_EQ(0, response.position());
+  EXPECT_EQ(0u, response.position());
   EXPECT_FALSE(response.has_action());
 
   request.set_id(1);
@@ -84,7 +84,7 @@ TEST(ReplicaTest, Promise)
 
   response = future.get();
   EXPECT_FALSE(response.okay());
-  EXPECT_EQ(1, response.id());
+  EXPECT_EQ(1u, response.id());
   EXPECT_FALSE(response.has_position());
   EXPECT_FALSE(response.has_action());
 
@@ -97,9 +97,9 @@ TEST(ReplicaTest, Promise)
 
   response = future.get();
   EXPECT_TRUE(response.okay());
-  EXPECT_EQ(3, response.id());
+  EXPECT_EQ(3u, response.id());
   EXPECT_TRUE(response.has_position());
-  EXPECT_EQ(0, response.position());
+  EXPECT_EQ(0u, response.position());
   EXPECT_FALSE(response.has_action());
 
   os::rmdir(path);
@@ -114,7 +114,7 @@ TEST(ReplicaTest, Append)
 
   Replica replica(path);
 
-  const int id = 1;
+  const uint64_t id = 1;
 
   PromiseRequest request1;
   request1.set_id(id);
@@ -129,7 +129,7 @@ TEST(ReplicaTest, Append)
   EXPECT_TRUE(response1.okay());
   EXPECT_EQ(id, response1.id());
   EXPECT_TRUE(response1.has_position());
-  EXPECT_EQ(0, response1.position());
+  EXPECT_EQ(0u, response1.position());
   EXPECT_FALSE(response1.has_action());
 
   WriteRequest request2;
@@ -147,18 +147,18 @@ TEST(ReplicaTest, Append)
   WriteResponse response2 = future2.get();
   EXPECT_TRUE(response2.okay());
   EXPECT_EQ(id, response2.id());
-  EXPECT_EQ(1, response2.position());
+  EXPECT_EQ(1u, response2.position());
 
   Future<std::list<Action> > actions = replica.read(1, 1);
   ASSERT_TRUE(actions.await(2.0));
   ASSERT_TRUE(actions.isReady());
-  ASSERT_EQ(1, actions.get().size());
+  ASSERT_EQ(1u, actions.get().size());
 
   Action action = actions.get().front();
-  EXPECT_EQ(1, action.position());
-  EXPECT_EQ(1, action.promised());
+  EXPECT_EQ(1u, action.position());
+  EXPECT_EQ(1u, action.promised());
   EXPECT_TRUE(action.has_performed());
-  EXPECT_EQ(1, action.performed());
+  EXPECT_EQ(1u, action.performed());
   EXPECT_FALSE(action.has_learned());
   EXPECT_TRUE(action.has_type());
   EXPECT_EQ(Action::APPEND, action.type());
@@ -179,7 +179,7 @@ TEST(ReplicaTest, Recover)
 
   Replica replica1(path);
 
-  const int id = 1;
+  const uint64_t id = 1;
 
   PromiseRequest request1;
   request1.set_id(id);
@@ -194,7 +194,7 @@ TEST(ReplicaTest, Recover)
   EXPECT_TRUE(response1.okay());
   EXPECT_EQ(id, response1.id());
   EXPECT_TRUE(response1.has_position());
-  EXPECT_EQ(0, response1.position());
+  EXPECT_EQ(0u, response1.position());
   EXPECT_FALSE(response1.has_action());
 
   WriteRequest request2;
@@ -212,19 +212,19 @@ TEST(ReplicaTest, Recover)
   WriteResponse response2 = future2.get();
   EXPECT_TRUE(response2.okay());
   EXPECT_EQ(id, response2.id());
-  EXPECT_EQ(1, response2.position());
+  EXPECT_EQ(1u, response2.position());
 
   Future<std::list<Action> > actions1 = replica1.read(1, 1);
   ASSERT_TRUE(actions1.await(2.0));
   ASSERT_TRUE(actions1.isReady());
-  ASSERT_EQ(1, actions1.get().size());
+  ASSERT_EQ(1u, actions1.get().size());
 
   {
     Action action = actions1.get().front();
-    EXPECT_EQ(1, action.position());
-    EXPECT_EQ(1, action.promised());
+    EXPECT_EQ(1u, action.position());
+    EXPECT_EQ(1u, action.promised());
     EXPECT_TRUE(action.has_performed());
-    EXPECT_EQ(1, action.performed());
+    EXPECT_EQ(1u, action.performed());
     EXPECT_FALSE(action.has_learned());
     EXPECT_TRUE(action.has_type());
     EXPECT_EQ(Action::APPEND, action.type());
@@ -239,14 +239,14 @@ TEST(ReplicaTest, Recover)
   Future<std::list<Action> > actions2 = replica2.read(1, 1);
   ASSERT_TRUE(actions2.await(2.0));
   ASSERT_TRUE(actions2.isReady());
-  ASSERT_EQ(1, actions2.get().size());
+  ASSERT_EQ(1u, actions2.get().size());
 
   {
     Action action = actions2.get().front();
-    EXPECT_EQ(1, action.position());
-    EXPECT_EQ(1, action.promised());
+    EXPECT_EQ(1u, action.position());
+    EXPECT_EQ(1u, action.promised());
     EXPECT_TRUE(action.has_performed());
-    EXPECT_EQ(1, action.performed());
+    EXPECT_EQ(1u, action.performed());
     EXPECT_FALSE(action.has_learned());
     EXPECT_TRUE(action.has_type());
     EXPECT_EQ(Action::APPEND, action.type());
@@ -281,15 +281,15 @@ TEST(CoordinatorTest, Elect)
   {
     Result<uint64_t> result = coord.elect(Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(0, result.get());
+    EXPECT_EQ(0u, result.get());
   }
 
   {
     Future<std::list<Action> > actions = replica1.read(0, 0);
     ASSERT_TRUE(actions.await(2.0));
     ASSERT_TRUE(actions.isReady());
-    ASSERT_EQ(1, actions.get().size());
-    EXPECT_EQ(0, actions.get().front().position());
+    ASSERT_EQ(1u, actions.get().size());
+    EXPECT_EQ(0u, actions.get().front().position());
     ASSERT_TRUE(actions.get().front().has_type());
     ASSERT_EQ(Action::NOP, actions.get().front().type());
   }
@@ -320,7 +320,7 @@ TEST(CoordinatorTest, AppendRead)
   {
     Result<uint64_t> result = coord.elect(Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(0, result.get());
+    EXPECT_EQ(0u, result.get());
   }
 
   uint64_t position;
@@ -329,14 +329,14 @@ TEST(CoordinatorTest, AppendRead)
     Result<uint64_t> result2 = coord.append("hello world", Timeout(2.0));
     ASSERT_TRUE(result2.isSome());
     position = result2.get();
-    EXPECT_EQ(1, position);
+    EXPECT_EQ(1u, position);
   }
 
   {
     Future<std::list<Action> > actions = replica1.read(position, position);
     ASSERT_TRUE(actions.await(2.0));
     ASSERT_TRUE(actions.isReady());
-    ASSERT_EQ(1, actions.get().size());
+    ASSERT_EQ(1u, actions.get().size());
     EXPECT_EQ(position, actions.get().front().position());
     ASSERT_TRUE(actions.get().front().has_type());
     ASSERT_EQ(Action::APPEND, actions.get().front().type());
@@ -369,7 +369,7 @@ TEST(CoordinatorTest, AppendReadError)
   {
     Result<uint64_t> result = coord.elect(Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(0, result.get());
+    EXPECT_EQ(0u, result.get());
   }
 
   uint64_t position;
@@ -378,7 +378,7 @@ TEST(CoordinatorTest, AppendReadError)
     Result<uint64_t> result2 = coord.append("hello world", Timeout(2.0));
     ASSERT_TRUE(result2.isSome());
     position = result2.get();
-    EXPECT_EQ(1, position);
+    EXPECT_EQ(1u, position);
   }
 
   {
@@ -454,7 +454,7 @@ TEST(CoordinatorTest, DISABLED_AppendNoQ
   {
     Result<uint64_t> result = coord.elect(Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(0, result.get());
+    EXPECT_EQ(0u, result.get());
   }
 
   network.remove(replica1.pid());
@@ -490,7 +490,7 @@ TEST(CoordinatorTest, Failover)
   {
     Result<uint64_t> result = coord1.elect(Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(0, result.get());
+    EXPECT_EQ(0u, result.get());
   }
 
   uint64_t position;
@@ -499,7 +499,7 @@ TEST(CoordinatorTest, Failover)
     Result<uint64_t> result = coord1.append("hello world", Timeout(2.0));
     ASSERT_TRUE(result.isSome());
     position = result.get();
-    EXPECT_EQ(1, position);
+    EXPECT_EQ(1u, position);
   }
 
   Network network2;
@@ -519,7 +519,7 @@ TEST(CoordinatorTest, Failover)
     Future<std::list<Action> > actions = replica2.read(position, position);
     ASSERT_TRUE(actions.await(2.0));
     ASSERT_TRUE(actions.isReady());
-    ASSERT_EQ(1, actions.get().size());
+    ASSERT_EQ(1u, actions.get().size());
     EXPECT_EQ(position, actions.get().front().position());
     ASSERT_TRUE(actions.get().front().has_type());
     ASSERT_EQ(Action::APPEND, actions.get().front().type());
@@ -552,7 +552,7 @@ TEST(CoordinatorTest, Demoted)
   {
     Result<uint64_t> result = coord1.elect(Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(0, result.get());
+    EXPECT_EQ(0u, result.get());
   }
 
   uint64_t position;
@@ -561,7 +561,7 @@ TEST(CoordinatorTest, Demoted)
     Result<uint64_t> result = coord1.append("hello world", Timeout(2.0));
     ASSERT_TRUE(result.isSome());
     position = result.get();
-    EXPECT_EQ(1, position);
+    EXPECT_EQ(1u, position);
   }
 
   Network network2;
@@ -587,14 +587,14 @@ TEST(CoordinatorTest, Demoted)
     Result<uint64_t> result = coord2.append("hello hello", Timeout(2.0));
     ASSERT_TRUE(result.isSome());
     position = result.get();
-    EXPECT_EQ(2, position);
+    EXPECT_EQ(2u, position);
   }
 
   {
     Future<std::list<Action> > actions = replica2.read(position, position);
     ASSERT_TRUE(actions.await(2.0));
     ASSERT_TRUE(actions.isReady());
-    ASSERT_EQ(1, actions.get().size());
+    ASSERT_EQ(1u, actions.get().size());
     EXPECT_EQ(position, actions.get().front().position());
     ASSERT_TRUE(actions.get().front().has_type());
     ASSERT_EQ(Action::APPEND, actions.get().front().type());
@@ -629,7 +629,7 @@ TEST(CoordinatorTest, Fill)
   {
     Result<uint64_t> result = coord1.elect(Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(0, result.get());
+    EXPECT_EQ(0u, result.get());
   }
 
   uint64_t position;
@@ -638,7 +638,7 @@ TEST(CoordinatorTest, Fill)
     Result<uint64_t> result = coord1.append("hello world", Timeout(2.0));
     ASSERT_TRUE(result.isSome());
     position = result.get();
-    EXPECT_EQ(1, position);
+    EXPECT_EQ(1u, position);
   }
 
   Replica replica3(path3);
@@ -662,7 +662,7 @@ TEST(CoordinatorTest, Fill)
     Future<std::list<Action> > actions = replica3.read(position, position);
     ASSERT_TRUE(actions.await(2.0));
     ASSERT_TRUE(actions.isReady());
-    ASSERT_EQ(1, actions.get().size());
+    ASSERT_EQ(1u, actions.get().size());
     EXPECT_EQ(position, actions.get().front().position());
     ASSERT_TRUE(actions.get().front().has_type());
     ASSERT_EQ(Action::APPEND, actions.get().front().type());
@@ -707,7 +707,7 @@ TEST(CoordinatorTest, NotLearnedFill)
   {
     Result<uint64_t> result = coord1.elect(Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(0, result.get());
+    EXPECT_EQ(0u, result.get());
   }
 
   uint64_t position;
@@ -716,7 +716,7 @@ TEST(CoordinatorTest, NotLearnedFill)
     Result<uint64_t> result = coord1.append("hello world", Timeout(2.0));
     ASSERT_TRUE(result.isSome());
     position = result.get();
-    EXPECT_EQ(1, position);
+    EXPECT_EQ(1u, position);
   }
 
   Replica replica3(path3);
@@ -740,7 +740,7 @@ TEST(CoordinatorTest, NotLearnedFill)
     Future<std::list<Action> > actions = replica3.read(position, position);
     ASSERT_TRUE(actions.await(2.0));
     ASSERT_TRUE(actions.isReady());
-    ASSERT_EQ(1, actions.get().size());
+    ASSERT_EQ(1u, actions.get().size());
     EXPECT_EQ(position, actions.get().front().position());
     ASSERT_TRUE(actions.get().front().has_type());
     ASSERT_EQ(Action::APPEND, actions.get().front().type());
@@ -776,7 +776,7 @@ TEST(CoordinatorTest, MultipleAppends)
   {
     Result<uint64_t> result = coord.elect(Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(0, result.get());
+    EXPECT_EQ(0u, result.get());
   }
 
   for (uint64_t position = 1; position <= 10; position++) {
@@ -790,7 +790,7 @@ TEST(CoordinatorTest, MultipleAppends)
     Future<std::list<Action> > actions = replica1.read(1, 10);
     ASSERT_TRUE(actions.await(2.0));
     ASSERT_TRUE(actions.isReady());
-    EXPECT_EQ(10, actions.get().size());
+    EXPECT_EQ(10u, actions.get().size());
     foreach (const Action& action, actions.get()) {
       ASSERT_TRUE(action.has_type());
       ASSERT_EQ(Action::APPEND, action.type());
@@ -835,7 +835,7 @@ TEST(CoordinatorTest, MultipleAppendsNot
   {
     Result<uint64_t> result = coord1.elect(Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(0, result.get());
+    EXPECT_EQ(0u, result.get());
   }
 
   for (uint64_t position = 1; position <= 10; position++) {
@@ -859,14 +859,14 @@ TEST(CoordinatorTest, MultipleAppendsNot
     ASSERT_TRUE(result.isNone());
     result = coord2.elect(Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(10, result.get());
+    EXPECT_EQ(10u, result.get());
   }
 
   {
     Future<std::list<Action> > actions = replica3.read(1, 10);
     ASSERT_TRUE(actions.await(2.0));
     ASSERT_TRUE(actions.isReady());
-    EXPECT_EQ(10, actions.get().size());
+    EXPECT_EQ(10u, actions.get().size());
     foreach (const Action& action, actions.get()) {
       ASSERT_TRUE(action.has_type());
       ASSERT_EQ(Action::APPEND, action.type());
@@ -903,7 +903,7 @@ TEST(CoordinatorTest, Truncate)
   {
     Result<uint64_t> result = coord.elect(Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(0, result.get());
+    EXPECT_EQ(0u, result.get());
   }
 
   for (uint64_t position = 1; position <= 10; position++) {
@@ -916,7 +916,7 @@ TEST(CoordinatorTest, Truncate)
   {
     Result<uint64_t> result = coord.truncate(7, Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(11, result.get());
+    EXPECT_EQ(11u, result.get());
   }
 
   {
@@ -930,7 +930,7 @@ TEST(CoordinatorTest, Truncate)
     Future<std::list<Action> > actions = replica1.read(7, 10);
     ASSERT_TRUE(actions.await(2.0));
     ASSERT_TRUE(actions.isReady());
-    EXPECT_EQ(4, actions.get().size());
+    EXPECT_EQ(4u, actions.get().size());
     foreach (const Action& action, actions.get()) {
       ASSERT_TRUE(action.has_type());
       ASSERT_EQ(Action::APPEND, action.type());
@@ -975,7 +975,7 @@ TEST(CoordinatorTest, TruncateNotLearned
   {
     Result<uint64_t> result = coord1.elect(Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(0, result.get());
+    EXPECT_EQ(0u, result.get());
   }
 
   for (uint64_t position = 1; position <= 10; position++) {
@@ -988,7 +988,7 @@ TEST(CoordinatorTest, TruncateNotLearned
   {
     Result<uint64_t> result = coord1.truncate(7, Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(11, result.get());
+    EXPECT_EQ(11u, result.get());
   }
 
   Replica replica3(path3);
@@ -1005,7 +1005,7 @@ TEST(CoordinatorTest, TruncateNotLearned
     ASSERT_TRUE(result.isNone());
     result = coord2.elect(Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(11, result.get());
+    EXPECT_EQ(11u, result.get());
   }
 
   {
@@ -1019,7 +1019,7 @@ TEST(CoordinatorTest, TruncateNotLearned
     Future<std::list<Action> > actions = replica3.read(7, 10);
     ASSERT_TRUE(actions.await(2.0));
     ASSERT_TRUE(actions.isReady());
-    EXPECT_EQ(4, actions.get().size());
+    EXPECT_EQ(4u, actions.get().size());
     foreach (const Action& action, actions.get()) {
       ASSERT_TRUE(action.has_type());
       ASSERT_EQ(Action::APPEND, action.type());
@@ -1058,7 +1058,7 @@ TEST(CoordinatorTest, TruncateLearnedFil
   {
     Result<uint64_t> result = coord1.elect(Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(0, result.get());
+    EXPECT_EQ(0u, result.get());
   }
 
   for (uint64_t position = 1; position <= 10; position++) {
@@ -1071,7 +1071,7 @@ TEST(CoordinatorTest, TruncateLearnedFil
   {
     Result<uint64_t> result = coord1.truncate(7, Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(11, result.get());
+    EXPECT_EQ(11u, result.get());
   }
 
   Replica replica3(path3);
@@ -1088,7 +1088,7 @@ TEST(CoordinatorTest, TruncateLearnedFil
     ASSERT_TRUE(result.isNone());
     result = coord2.elect(Timeout(2.0));
     ASSERT_TRUE(result.isSome());
-    EXPECT_EQ(11, result.get());
+    EXPECT_EQ(11u, result.get());
   }
 
   {
@@ -1102,7 +1102,7 @@ TEST(CoordinatorTest, TruncateLearnedFil
     Future<std::list<Action> > actions = replica3.read(7, 10);
     ASSERT_TRUE(actions.await(2.0));
     ASSERT_TRUE(actions.isReady());
-    EXPECT_EQ(4, actions.get().size());
+    EXPECT_EQ(4u, actions.get().size());
     foreach (const Action& action, actions.get()) {
       ASSERT_TRUE(action.has_type());
       ASSERT_EQ(Action::APPEND, action.type());
@@ -1143,7 +1143,7 @@ TEST(LogTest, WriteRead)
     reader.read(position.get(), position.get(), seconds(1.0));
 
   ASSERT_TRUE(entries.isSome());
-  ASSERT_EQ(1, entries.get().size());
+  ASSERT_EQ(1u, entries.get().size());
   EXPECT_EQ(position.get(), entries.get().front().position);
   EXPECT_EQ("hello world", entries.get().front().data);
 

Modified: incubator/mesos/trunk/src/tests/master_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/master_tests.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/master_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/master_tests.cpp Fri Aug 24 22:01:21 2012
@@ -126,7 +126,7 @@ TEST(MasterTest, TaskRunning)
 
   WAIT_UNTIL(resourceOffersCall);
 
-  EXPECT_NE(0, offers.size());
+  EXPECT_NE(0u, offers.size());
 
   TaskInfo task;
   task.set_name("");
@@ -222,7 +222,7 @@ TEST(MasterTest, KillTask)
 
   WAIT_UNTIL(resourceOffersCall);
 
-  EXPECT_NE(0, offers.size());
+  EXPECT_NE(0u, offers.size());
 
   TaskID taskId;
   taskId.set_value("1");
@@ -333,7 +333,7 @@ TEST(MasterTest, RecoverResources)
 
   WAIT_UNTIL(resourceOffersCall1);
 
-  EXPECT_NE(0, offers1.size());
+  EXPECT_NE(0u, offers1.size());
 
   TaskID taskId;
   taskId.set_value("1");
@@ -363,7 +363,7 @@ TEST(MasterTest, RecoverResources)
   // Scheduler should get an offer for task resources.
   WAIT_UNTIL(resourceOffersCall2);
 
-  EXPECT_NE(0, offers2.size());
+  EXPECT_NE(0u, offers2.size());
 
   Offer offer = offers2[0];
   EXPECT_EQ(taskResources, offer.resources());
@@ -380,7 +380,7 @@ TEST(MasterTest, RecoverResources)
   // Scheduler should get an offer for the complete slave resources.
   WAIT_UNTIL(resourceOffersCall3);
 
-  EXPECT_NE(0, offers3.size());
+  EXPECT_NE(0u, offers3.size());
   EXPECT_EQ(slaveResources, offers3[0].resources());
 
   driver.stop();
@@ -465,7 +465,7 @@ TEST(MasterTest, FrameworkMessage)
 
   WAIT_UNTIL(resourceOffersCall);
 
-  EXPECT_NE(0, offers.size());
+  EXPECT_NE(0u, offers.size());
 
   TaskInfo task;
   task.set_name("");
@@ -595,7 +595,7 @@ TEST(MasterTest, MultipleExecutors)
 
   WAIT_UNTIL(resourceOffersCall);
 
-  ASSERT_NE(0, offers.size());
+  ASSERT_NE(0u, offers.size());
 
   ExecutorInfo executor1; // Bug in gcc 4.1.*, must assign on next line.
   executor1 = CREATE_EXECUTOR_INFO(executorId1, "exit 1");
@@ -1046,7 +1046,7 @@ TEST_F(FrameworksManagerTestFixture, Add
 
   map<FrameworkID, FrameworkInfo> result = future3.get().get();
 
-  ASSERT_EQ(1, result.count(id));
+  ASSERT_EQ(1u, result.count(id));
   EXPECT_EQ("test name", result[id].name());
   EXPECT_EQ("test user", result[id].user());
 

Modified: incubator/mesos/trunk/src/tests/multihashmap_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/multihashmap_tests.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/multihashmap_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/multihashmap_tests.cpp Fri Aug 24 22:01:21 2012
@@ -31,20 +31,20 @@ TEST(Multihashmap, Put)
   multihashmap<string, uint16_t> map;
 
   map.put("foo", 1024);
-  ASSERT_EQ(1, map.get("foo").size());
+  ASSERT_EQ(1u, map.get("foo").size());
 
   map.put("foo", 1025);
-  ASSERT_EQ(2, map.get("foo").size());
+  ASSERT_EQ(2u, map.get("foo").size());
 
-  ASSERT_EQ(2, map.size());
+  ASSERT_EQ(2u, map.size());
 
   map.put("bar", 1024);
-  ASSERT_EQ(1, map.get("bar").size());
+  ASSERT_EQ(1u, map.get("bar").size());
 
   map.put("bar", 1025);
-  ASSERT_EQ(2, map.get("bar").size());
+  ASSERT_EQ(2u, map.get("bar").size());
 
-  ASSERT_EQ(4, map.size());
+  ASSERT_EQ(4u, map.size());
 }
 
 
@@ -54,19 +54,19 @@ TEST(Multihashmap, Remove)
 
   map.put("foo", 1024);
   map.remove("foo", 1024);
-  ASSERT_EQ(0, map.get("foo").size());
+  ASSERT_EQ(0u, map.get("foo").size());
 
-  ASSERT_EQ(0, map.size());
+  ASSERT_EQ(0u, map.size());
 
   map.put("foo", 1024);
   map.put("foo", 1025);
-  ASSERT_EQ(2, map.get("foo").size());
+  ASSERT_EQ(2u, map.get("foo").size());
 
-  ASSERT_EQ(2, map.size());
+  ASSERT_EQ(2u, map.size());
 
   map.remove("foo");
-  ASSERT_EQ(0, map.get("foo").size());
-  ASSERT_EQ(0, map.size());
+  ASSERT_EQ(0u, map.get("foo").size());
+  ASSERT_EQ(0u, map.size());
 }
 
 
@@ -76,17 +76,17 @@ TEST(Multihashmap, Size)
 
   map.put("foo", 1024);
   map.put("foo", 1025);
-  ASSERT_EQ(2, map.get("foo").size());
+  ASSERT_EQ(2u, map.get("foo").size());
   ASSERT_TRUE(map.contains("foo", 1024));
   ASSERT_TRUE(map.contains("foo", 1025));
-  ASSERT_EQ(2, map.size());
+  ASSERT_EQ(2u, map.size());
 
   map.put("bar", 1024);
   map.put("bar", 1025);
-  ASSERT_EQ(2, map.get("bar").size());
+  ASSERT_EQ(2u, map.get("bar").size());
   ASSERT_TRUE(map.contains("bar", 1024));
   ASSERT_TRUE(map.contains("bar", 1025));
-  ASSERT_EQ(4, map.size());
+  ASSERT_EQ(4u, map.size());
 }
 
 
@@ -96,7 +96,7 @@ TEST(Multihashmap, Iterator)
 
   map.put("foo", 1024);
   map.put("foo", 1025);
-  ASSERT_EQ(2, map.get("foo").size());
+  ASSERT_EQ(2u, map.get("foo").size());
   ASSERT_TRUE(map.contains("foo", 1024));
   ASSERT_TRUE(map.contains("foo", 1025));
 
@@ -124,8 +124,8 @@ TEST(Multihashmap, Foreach)
 
   map.put("foo", 1024);
   map.put("bar", 1025);
-  ASSERT_EQ(1, map.get("foo").size());
-  ASSERT_EQ(1, map.get("bar").size());
+  ASSERT_EQ(1u, map.get("foo").size());
+  ASSERT_EQ(1u, map.get("bar").size());
   ASSERT_TRUE(map.contains("foo", 1024));
   ASSERT_TRUE(map.contains("bar", 1025));
 

Modified: incubator/mesos/trunk/src/tests/resource_offers_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/resource_offers_tests.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/resource_offers_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/resource_offers_tests.cpp Fri Aug 24 22:01:21 2012
@@ -85,8 +85,8 @@ TEST(ResourceOffersTest, ResourceOfferWi
 
   WAIT_UNTIL(resourceOffersCall);
 
-  EXPECT_NE(0, offers.size());
-  EXPECT_GE(10, offers.size());
+  EXPECT_NE(0u, offers.size());
+  EXPECT_GE(10u, offers.size());
 
   Resources resources(offers[0].resources());
   EXPECT_EQ(2, resources.get("cpus", Value::Scalar()).value());
@@ -124,7 +124,7 @@ TEST(ResourceOffersTest, TaskUsesNoResou
 
   WAIT_UNTIL(resourceOffersCall);
 
-  EXPECT_NE(0, offers.size());
+  EXPECT_NE(0u, offers.size());
 
   TaskInfo task;
   task.set_name("");
@@ -184,7 +184,7 @@ TEST(ResourceOffersTest, TaskUsesInvalid
 
   WAIT_UNTIL(resourceOffersCall);
 
-  EXPECT_NE(0, offers.size());
+  EXPECT_NE(0u, offers.size());
 
   TaskInfo task;
   task.set_name("");
@@ -249,7 +249,7 @@ TEST(ResourceOffersTest, TaskUsesMoreRes
 
   WAIT_UNTIL(resourceOffersCall);
 
-  EXPECT_NE(0, offers.size());
+  EXPECT_NE(0u, offers.size());
 
   TaskInfo task;
   task.set_name("");
@@ -314,7 +314,7 @@ TEST(ResourceOffersTest, ResourcesGetReo
 
   WAIT_UNTIL(sched1ResourceOfferCall);
 
-  EXPECT_NE(0, offers.size());
+  EXPECT_NE(0u, offers.size());
 
   vector<TaskInfo> tasks; // Use nothing!
 
@@ -374,7 +374,7 @@ TEST(ResourceOffersTest, ResourcesGetReo
 
   WAIT_UNTIL(sched1ResourceOffersCall);
 
-  EXPECT_NE(0, offers.size());
+  EXPECT_NE(0u, offers.size());
 
   TaskInfo task;
   task.set_name("");
@@ -503,7 +503,7 @@ TEST(ResourceOffersTest, Request)
   WAIT_UNTIL(resourcesRequestedCall);
 
   EXPECT_EQ(requestsSent.size(), requestsReceived.size());
-  EXPECT_NE(0, requestsReceived.size());
+  EXPECT_NE(0u, requestsReceived.size());
   EXPECT_EQ(request.slave_id(), requestsReceived[0].slave_id());
 
   driver.stop();
@@ -565,7 +565,7 @@ TEST(ResourceOffersTest, TasksExecutorIn
 
   WAIT_UNTIL(resourceOffersCall);
 
-  EXPECT_NE(0, offers.size());
+  EXPECT_NE(0u, offers.size());
 
   ExecutorInfo executor;
   executor.mutable_executor_id()->set_value("default");

Modified: incubator/mesos/trunk/src/tests/resources_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/resources_tests.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/resources_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/resources_tests.cpp Fri Aug 24 22:01:21 2012
@@ -82,7 +82,7 @@ TEST(ResourcesTest, Printing)
 TEST(ResourcesTest, InitializedIsEmpty)
 {
   Resources r;
-  EXPECT_EQ(0, r.size());
+  EXPECT_EQ(0u, r.size());
 }
 
 
@@ -93,11 +93,11 @@ TEST(ResourcesTest, BadResourcesNotAlloc
   cpus.mutable_scalar()->set_value(1);
   Resources r;
   r += cpus;
-  EXPECT_EQ(0, r.allocatable().size());
+  EXPECT_EQ(0u, r.allocatable().size());
   cpus.set_name("cpus");
   cpus.mutable_scalar()->set_value(0);
   r += cpus;
-  EXPECT_EQ(0, r.allocatable().size());
+  EXPECT_EQ(0u, r.allocatable().size());
 }
 
 
@@ -114,8 +114,8 @@ TEST(ResourcesTest, ScalarEquals)
   r2 += cpus;
   r2 += mem;
 
-  EXPECT_EQ(2, r1.size());
-  EXPECT_EQ(2, r2.size());
+  EXPECT_EQ(2u, r1.size());
+  EXPECT_EQ(2u, r2.size());
   EXPECT_EQ(r1, r2);
 }
 
@@ -158,13 +158,13 @@ TEST(ResourcesTest, ScalarAddition)
   r2 += mem2;
 
   Resources sum = r1 + r2;
-  EXPECT_EQ(2, sum.size());
+  EXPECT_EQ(2u, sum.size());
   EXPECT_EQ(3, sum.get("cpus", Value::Scalar()).value());
   EXPECT_EQ(15, sum.get("mem", Value::Scalar()).value());
 
   Resources r = r1;
   r += r2;
-  EXPECT_EQ(2, r.size());
+  EXPECT_EQ(2u, r.size());
   EXPECT_EQ(3, r.get("cpus", Value::Scalar()).value());
   EXPECT_EQ(15, r.get("mem", Value::Scalar()).value());
 }
@@ -187,7 +187,7 @@ TEST(ResourcesTest, ScalarSubtraction)
   r2 += mem2;
 
   Resources diff = r1 - r2;
-  EXPECT_EQ(2, diff.size());
+  EXPECT_EQ(2u, diff.size());
   EXPECT_EQ(49.5, diff.get("cpus", Value::Scalar()).value());
   EXPECT_EQ(3072, diff.get("mem", Value::Scalar()).value());
 
@@ -198,7 +198,7 @@ TEST(ResourcesTest, ScalarSubtraction)
 
   r = r1;
   r -= r1;
-  EXPECT_EQ(0, r.allocatable().size());
+  EXPECT_EQ(0u, r.allocatable().size());
 }
 
 
@@ -268,7 +268,7 @@ TEST(ResourcesTest, RangesAddition)
   r += ports1;
   r += ports2;
 
-  EXPECT_EQ(1, r.size());
+  EXPECT_EQ(1u, r.size());
 
   const Value::Ranges& ranges = r.get("ports", Value::Ranges());
 
@@ -285,7 +285,7 @@ TEST(ResourcesTest, RangesAddition2)
   r += ports1;
   r += ports2;
 
-  EXPECT_EQ(1, r.size());
+  EXPECT_EQ(1u, r.size());
 
   const Value::Ranges& ranges = r.get("ports", Value::Ranges());
 
@@ -304,7 +304,7 @@ TEST(ResourcesTest, RangesAdditon3)
   r1 += ports1;
   r1 += ports2;
 
-  EXPECT_EQ(1, r1.size());
+  EXPECT_EQ(1u, r1.size());
 
   const Value::Ranges& ranges = r1.get("ports", Value::Ranges());
 
@@ -314,7 +314,7 @@ TEST(ResourcesTest, RangesAdditon3)
   r2 += ports3;
   r2 += ports4;
 
-  EXPECT_EQ(1, r2.size());
+  EXPECT_EQ(1u, r2.size());
 
   const Value::Ranges& ranges2 = r2.get("ports", Value::Ranges());
 
@@ -322,7 +322,7 @@ TEST(ResourcesTest, RangesAdditon3)
 
   r2 += r1;
 
-  EXPECT_EQ(1, r2.size());
+  EXPECT_EQ(1u, r2.size());
 
   const Value::Ranges& ranges3 = r2.get("ports", Value::Ranges());
 
@@ -339,7 +339,7 @@ TEST(ResourcesTest, RangesAddition4)
   r += ports1;
   r += ports2;
 
-  EXPECT_EQ(1, r.size());
+  EXPECT_EQ(1u, r.size());
 
   const Value::Ranges& ranges = r.get("ports", Value::Ranges());
 
@@ -356,7 +356,7 @@ TEST(ResourcesTest, RangesSubtraction)
   r += ports1;
   r -= ports2;
 
-  EXPECT_EQ(1, r.size());
+  EXPECT_EQ(1u, r.size());
 
   const Value::Ranges& ranges = r.get("ports", Value::Ranges());
 
@@ -373,7 +373,7 @@ TEST(ResourcesTest, RangesSubtraction1)
   r += ports1;
   r -= ports2;
 
-  EXPECT_EQ(1, r.size());
+  EXPECT_EQ(1u, r.size());
 
   const Value::Ranges& ranges = r.get("ports", Value::Ranges());
 
@@ -390,7 +390,7 @@ TEST(ResourcesTest, RangesSubtraction2)
   r += ports1;
   r -= ports2;
 
-  EXPECT_EQ(1, r.size());
+  EXPECT_EQ(1u, r.size());
 
   const Value::Ranges& ranges = r.get("ports", Value::Ranges());
 
@@ -409,7 +409,7 @@ TEST(ResourcesTest, RangesSubtraction3)
 
   resourcesFree = resourcesFree.allocatable();
 
-  EXPECT_EQ(1, resourcesFree.size());
+  EXPECT_EQ(1u, resourcesFree.size());
 
   const Value::Ranges& ranges = resourcesFree.get("ports", Value::Ranges());
 
@@ -427,7 +427,7 @@ TEST(ResourcesTest, RangesSubtraction4)
 
   resourcesOffered -= resources;
 
-  EXPECT_EQ(1, resourcesOffered.size());
+  EXPECT_EQ(1u, resourcesOffered.size());
 
   const Value::Ranges& ranges = resourcesOffered.get("ports", Value::Ranges());
 
@@ -444,7 +444,7 @@ TEST(ResourcesTest, RangesSubtraction5)
   r += ports1;
   r -= ports2;
 
-  EXPECT_EQ(1, r.size());
+  EXPECT_EQ(1u, r.size());
 
   const Value::Ranges& ranges = r.get("ports", Value::Ranges());
 
@@ -461,7 +461,7 @@ TEST(ResourcesTest, RangesSubtraction6)
   r += ports1;
   r -= ports2;
 
-  EXPECT_EQ(1, r.size());
+  EXPECT_EQ(1u, r.size());
 
   const Value::Ranges& ranges = r.get("ports", Value::Ranges());
 
@@ -494,8 +494,8 @@ TEST(ResourcesTest, SetSubset)
   Resources r2;
   r2 += disks2;
 
-  EXPECT_EQ(1, r1.size());
-  EXPECT_EQ(1, r2.size());
+  EXPECT_EQ(1u, r1.size());
+  EXPECT_EQ(1u, r2.size());
   EXPECT_TRUE(r1 <= r2);
   EXPECT_FALSE(r2 <= r1);
 }
@@ -510,7 +510,7 @@ TEST(ResourcesTest, SetAddition)
   r += disks1;
   r += disks2;
 
-  EXPECT_EQ(1, r.size());
+  EXPECT_EQ(1u, r.size());
 
   const Value::Set& set = r.get("disks", Value::Set());
 
@@ -527,7 +527,7 @@ TEST(ResourcesTest, SetSubtraction)
   r += disks1;
   r -= disks2;
 
-  EXPECT_EQ(1, r.size());
+  EXPECT_EQ(1u, r.size());
 
   const Value::Set& set = r.get("disks", Value::Set());
 

Modified: incubator/mesos/trunk/src/tests/sorter_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/sorter_tests.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/sorter_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/sorter_tests.cpp Fri Aug 24 22:01:21 2012
@@ -31,7 +31,7 @@ using mesos::internal::master::DRFSorter
 using std::list;
 using std::string;
 
-void checkSorter(Sorter& sorter, int count, ...)
+void checkSorter(Sorter& sorter, uint32_t count, ...)
 {
   va_list elements;
   va_start(elements, count);

Modified: incubator/mesos/trunk/src/tests/stout_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/stout_tests.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/stout_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/stout_tests.cpp Fri Aug 24 22:01:21 2012
@@ -75,21 +75,21 @@ TEST(StoutStringsTest, Trim)
 TEST(StoutStringsTest, SplitEmptyString)
 {
   vector<string> tokens = strings::split("", " ");
-  ASSERT_EQ(0, tokens.size());
+  ASSERT_EQ(0u, tokens.size());
 }
 
 
 TEST(StoutStringsTest, SplitDelimOnlyString)
 {
   vector<string> tokens = strings::split("   ", " ");
-  ASSERT_EQ(0, tokens.size());
+  ASSERT_EQ(0u, tokens.size());
 }
 
 
 TEST(StoutStringsTest, Split)
 {
   vector<string> tokens = strings::split("hello world,  what's up?", " ");
-  ASSERT_EQ(4, tokens.size());
+  ASSERT_EQ(4u, tokens.size());
   EXPECT_EQ("hello",  tokens[0]);
   EXPECT_EQ("world,", tokens[1]);
   EXPECT_EQ("what's", tokens[2]);
@@ -100,7 +100,7 @@ TEST(StoutStringsTest, Split)
 TEST(StoutStringsTest, SplitStringWithDelimsAtStart)
 {
   vector<string> tokens = strings::split("  hello world,  what's up?", " ");
-  ASSERT_EQ(4, tokens.size());
+  ASSERT_EQ(4u, tokens.size());
   EXPECT_EQ("hello",  tokens[0]);
   EXPECT_EQ("world,", tokens[1]);
   EXPECT_EQ("what's", tokens[2]);
@@ -111,7 +111,7 @@ TEST(StoutStringsTest, SplitStringWithDe
 TEST(StoutStringsTest, SplitStringWithDelimsAtEnd)
 {
   vector<string> tokens = strings::split("hello world,  what's up?  ", " ");
-  ASSERT_EQ(4, tokens.size());
+  ASSERT_EQ(4u, tokens.size());
   EXPECT_EQ("hello",  tokens[0]);
   EXPECT_EQ("world,", tokens[1]);
   EXPECT_EQ("what's", tokens[2]);
@@ -122,7 +122,7 @@ TEST(StoutStringsTest, SplitStringWithDe
 TEST(StoutStringsTest, SplitStringWithDelimsAtStartAndEnd)
 {
   vector<string> tokens = strings::split("  hello world,  what's up?  ", " ");
-  ASSERT_EQ(4, tokens.size());
+  ASSERT_EQ(4u, tokens.size());
   EXPECT_EQ("hello",  tokens[0]);
   EXPECT_EQ("world,", tokens[1]);
   EXPECT_EQ("what's", tokens[2]);
@@ -133,7 +133,7 @@ TEST(StoutStringsTest, SplitStringWithDe
 TEST(StoutStringsTest, SplitWithMultipleDelims)
 {
   vector<string> tokens = strings::split("hello\tworld,  \twhat's up?", " \t");
-  ASSERT_EQ(4, tokens.size());
+  ASSERT_EQ(4u, tokens.size());
   EXPECT_EQ("hello",  tokens[0]);
   EXPECT_EQ("world,", tokens[1]);
   EXPECT_EQ("what's", tokens[2]);
@@ -144,12 +144,12 @@ TEST(StoutStringsTest, SplitWithMultiple
 TEST(StoutStringsTest, Pairs)
 {
   map<string, vector<string> > pairs = strings::pairs("one=1,two=2", ",", "=");
-  ASSERT_EQ(2, pairs.size());
-  ASSERT_EQ(1, pairs.count("one"));
-  ASSERT_EQ(1, pairs["one"].size());
+  ASSERT_EQ(2u, pairs.size());
+  ASSERT_EQ(1u, pairs.count("one"));
+  ASSERT_EQ(1u, pairs["one"].size());
   EXPECT_EQ("1", pairs["one"].front());
-  ASSERT_EQ(1, pairs.count("two"));
-  ASSERT_EQ(1, pairs["two"].size());
+  ASSERT_EQ(1u, pairs.count("two"));
+  ASSERT_EQ(1u, pairs["two"].size());
   EXPECT_EQ("2", pairs["two"].front());
 }
 
@@ -316,7 +316,7 @@ TEST_F(StoutUtilsTest, find)
     files.insert(file);
   }
 
-  ASSERT_EQ(2, files.size());
+  ASSERT_EQ(2u, files.size());
   ASSERT_TRUE(files.contains(file1));
   ASSERT_TRUE(files.contains(file2));
 }
@@ -368,7 +368,7 @@ TEST_F(StoutUtilsTest, hashset)
   hs2.insert(std::string("HS2"));
 
   hs1 = hs2;
-  ASSERT_TRUE(hs1.size() == 1);
+  ASSERT_EQ(1u, hs1.size());
   ASSERT_TRUE(hs1.contains("HS2"));
   ASSERT_TRUE(hs1 == hs2);
 }
@@ -407,20 +407,20 @@ TEST(StoutMultihashmapTest, Put)
   multihashmap<string, uint16_t> map;
 
   map.put("foo", 1024);
-  ASSERT_EQ(1, map.get("foo").size());
+  ASSERT_EQ(1u, map.get("foo").size());
 
   map.put("foo", 1025);
-  ASSERT_EQ(2, map.get("foo").size());
+  ASSERT_EQ(2u, map.get("foo").size());
 
-  ASSERT_EQ(2, map.size());
+  ASSERT_EQ(2u, map.size());
 
   map.put("bar", 1024);
-  ASSERT_EQ(1, map.get("bar").size());
+  ASSERT_EQ(1u, map.get("bar").size());
 
   map.put("bar", 1025);
-  ASSERT_EQ(2, map.get("bar").size());
+  ASSERT_EQ(2u, map.get("bar").size());
 
-  ASSERT_EQ(4, map.size());
+  ASSERT_EQ(4u, map.size());
 }
 
 
@@ -430,19 +430,19 @@ TEST(StoutMultihashmapTest, Remove)
 
   map.put("foo", 1024);
   map.remove("foo", 1024);
-  ASSERT_EQ(0, map.get("foo").size());
+  ASSERT_EQ(0u, map.get("foo").size());
 
-  ASSERT_EQ(0, map.size());
+  ASSERT_EQ(0u, map.size());
 
   map.put("foo", 1024);
   map.put("foo", 1025);
-  ASSERT_EQ(2, map.get("foo").size());
+  ASSERT_EQ(2u, map.get("foo").size());
 
-  ASSERT_EQ(2, map.size());
+  ASSERT_EQ(2u, map.size());
 
   map.remove("foo");
-  ASSERT_EQ(0, map.get("foo").size());
-  ASSERT_EQ(0, map.size());
+  ASSERT_EQ(0u, map.get("foo").size());
+  ASSERT_EQ(0u, map.size());
 }
 
 
@@ -452,17 +452,17 @@ TEST(StoutMultihashmapTest, Size)
 
   map.put("foo", 1024);
   map.put("foo", 1025);
-  ASSERT_EQ(2, map.get("foo").size());
+  ASSERT_EQ(2u, map.get("foo").size());
   ASSERT_TRUE(map.contains("foo", 1024));
   ASSERT_TRUE(map.contains("foo", 1025));
-  ASSERT_EQ(2, map.size());
+  ASSERT_EQ(2u, map.size());
 
   map.put("bar", 1024);
   map.put("bar", 1025);
-  ASSERT_EQ(2, map.get("bar").size());
+  ASSERT_EQ(2u, map.get("bar").size());
   ASSERT_TRUE(map.contains("bar", 1024));
   ASSERT_TRUE(map.contains("bar", 1025));
-  ASSERT_EQ(4, map.size());
+  ASSERT_EQ(4u, map.size());
 }
 
 
@@ -472,7 +472,7 @@ TEST(StoutMultihashmapTest, Iterator)
 
   map.put("foo", 1024);
   map.put("foo", 1025);
-  ASSERT_EQ(2, map.get("foo").size());
+  ASSERT_EQ(2u, map.get("foo").size());
   ASSERT_TRUE(map.contains("foo", 1024));
   ASSERT_TRUE(map.contains("foo", 1025));
 
@@ -500,8 +500,8 @@ TEST(StoutMultihashmapTest, Foreach)
 
   map.put("foo", 1024);
   map.put("bar", 1025);
-  ASSERT_EQ(1, map.get("foo").size());
-  ASSERT_EQ(1, map.get("bar").size());
+  ASSERT_EQ(1u, map.get("foo").size());
+  ASSERT_EQ(1u, map.get("bar").size());
   ASSERT_TRUE(map.contains("foo", 1024));
   ASSERT_TRUE(map.contains("bar", 1025));
 

Modified: incubator/mesos/trunk/src/tests/utils.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/utils.hpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/utils.hpp (original)
+++ incubator/mesos/trunk/src/tests/utils.hpp Fri Aug 24 22:01:21 2012
@@ -153,27 +153,26 @@ ACTION_P3(LaunchTasks, tasks, cpus, mem)
   int numTasks = tasks;
 
   int launched = 0;
-  for (int i = 0; i < offers.size(); i++) {
+  for (size_t i = 0; i < offers.size(); i++) {
     const Offer& offer = offers[i];
     double offeredCpus = 0;
     double offeredMem = 0;
 
-    for (int i = 0; i < offer.resources_size(); i++) {
-      const Resource& resource = offer.resources(i);
+    for (int j = 0; j < offer.resources_size(); j++) {
+      const Resource& resource = offer.resources(j);
       if (resource.name() == "cpus" &&
-	  resource.type() == Value::SCALAR) {
-	offeredCpus = resource.scalar().value();
+	        resource.type() == Value::SCALAR) {
+	      offeredCpus = resource.scalar().value();
       } else if (resource.name() == "mem" &&
-		 resource.type() == Value::SCALAR) {
-	offeredMem = resource.scalar().value();
+		             resource.type() == Value::SCALAR) {
+	      offeredMem = resource.scalar().value();
       }
     }
 
     int nextTaskId = 0;
     std::vector<TaskInfo> tasks;
-    while (offeredCpus >= cpus &&
-	offeredMem >= mem &&
-	launched < numTasks) {
+
+    while (offeredCpus >= cpus && offeredMem >= mem && launched < numTasks) {
       TaskInfo task;
       task.set_name("TestTask");
       task.mutable_task_id()->set_value(stringify(nextTaskId++));
@@ -212,7 +211,7 @@ ACTION(DeclineOffers)
   SchedulerDriver* driver = arg0;
   std::vector<Offer> offers = arg1;
 
-  for (int i = 0; i < offers.size(); i++) {
+  for (size_t i = 0; i < offers.size(); i++) {
     driver->declineOffer(offers[i].id());
   }
 }
@@ -504,7 +503,10 @@ struct trigger
 /**
  * Definition of the Trigger action to be used with gmock.
  */
-ACTION_P(Trigger, trigger) { trigger->value = true; }
+ACTION_P(Trigger, trigger)
+{
+  trigger->value = true;
+}
 
 
 /**

Modified: incubator/mesos/trunk/src/tests/zookeeper_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/zookeeper_tests.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/zookeeper_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/zookeeper_tests.cpp Fri Aug 24 22:01:21 2012
@@ -92,8 +92,8 @@ TEST_F(ZooKeeperTest, Group)
   memberships.await();
 
   ASSERT_TRUE(memberships.isReady());
-  EXPECT_EQ(1, memberships.get().size());
-  EXPECT_EQ(1, memberships.get().count(membership.get()));
+  EXPECT_EQ(1u, memberships.get().size());
+  EXPECT_EQ(1u, memberships.get().count(membership.get()));
 
   process::Future<std::string> data = group.data(membership.get());
 
@@ -118,7 +118,7 @@ TEST_F(ZooKeeperTest, Group)
   memberships.await();
 
   ASSERT_TRUE(memberships.isReady());
-  EXPECT_EQ(0, memberships.get().size());
+  EXPECT_EQ(0u, memberships.get().size());
 
   ASSERT_TRUE(membership.get().cancelled().isReady());
   ASSERT_TRUE(membership.get().cancelled().get());
@@ -150,8 +150,8 @@ TEST_F(ZooKeeperTest, GroupJoinWithDisco
   memberships.await();
 
   ASSERT_TRUE(memberships.isReady());
-  EXPECT_EQ(1, memberships.get().size());
-  EXPECT_EQ(1, memberships.get().count(membership.get()));
+  EXPECT_EQ(1u, memberships.get().size());
+  EXPECT_EQ(1u, memberships.get().count(membership.get()));
 }
 
 
@@ -174,8 +174,8 @@ TEST_F(ZooKeeperTest, GroupDataWithDisco
   memberships.await();
 
   ASSERT_TRUE(memberships.isReady());
-  EXPECT_EQ(1, memberships.get().size());
-  EXPECT_EQ(1, memberships.get().count(membership.get()));
+  EXPECT_EQ(1u, memberships.get().size());
+  EXPECT_EQ(1u, memberships.get().count(membership.get()));
 
   zks->shutdownNetwork();
 
@@ -213,8 +213,8 @@ TEST_F(ZooKeeperTest, GroupCancelWithDis
   memberships.await();
 
   ASSERT_TRUE(memberships.isReady());
-  EXPECT_EQ(1, memberships.get().size());
-  EXPECT_EQ(1, memberships.get().count(membership.get()));
+  EXPECT_EQ(1u, memberships.get().size());
+  EXPECT_EQ(1u, memberships.get().count(membership.get()));
 
   process::Future<std::string> data = group.data(membership.get());
 
@@ -247,7 +247,7 @@ TEST_F(ZooKeeperTest, GroupCancelWithDis
   memberships.await();
 
   ASSERT_TRUE(memberships.isReady());
-  EXPECT_EQ(0, memberships.get().size());
+  EXPECT_EQ(0u, memberships.get().size());
 
   ASSERT_TRUE(membership.get().cancelled().isReady());
   ASSERT_TRUE(membership.get().cancelled().get());
@@ -273,8 +273,8 @@ TEST_F(ZooKeeperTest, GroupWatchWithSess
   memberships.await();
 
   ASSERT_TRUE(memberships.isReady());
-  EXPECT_EQ(1, memberships.get().size());
-  EXPECT_EQ(1, memberships.get().count(membership.get()));
+  EXPECT_EQ(1u, memberships.get().size());
+  EXPECT_EQ(1u, memberships.get().count(membership.get()));
 
   process::Future<Option<int64_t> > session = group.session();
 
@@ -292,7 +292,7 @@ TEST_F(ZooKeeperTest, GroupWatchWithSess
   memberships.await();
 
   ASSERT_TRUE(memberships.isReady());
-  EXPECT_EQ(0, memberships.get().size());
+  EXPECT_EQ(0u, memberships.get().size());
 
   ASSERT_TRUE(membership.get().cancelled().isReady());
   ASSERT_FALSE(membership.get().cancelled().get());
@@ -328,9 +328,9 @@ TEST_F(ZooKeeperTest, MultipleGroups)
   memberships1.await();
 
   ASSERT_TRUE(memberships1.isReady());
-  EXPECT_EQ(2, memberships1.get().size());
-  EXPECT_EQ(1, memberships1.get().count(membership1.get()));
-  EXPECT_EQ(1, memberships1.get().count(membership2.get()));
+  EXPECT_EQ(2u, memberships1.get().size());
+  EXPECT_EQ(1u, memberships1.get().count(membership1.get()));
+  EXPECT_EQ(1u, memberships1.get().count(membership2.get()));
 
   process::Future<std::set<zookeeper::Group::Membership> > memberships2 =
     group2.watch();
@@ -338,9 +338,9 @@ TEST_F(ZooKeeperTest, MultipleGroups)
   memberships2.await();
 
   ASSERT_TRUE(memberships2.isReady());
-  EXPECT_EQ(2, memberships2.get().size());
-  EXPECT_EQ(1, memberships2.get().count(membership1.get()));
-  EXPECT_EQ(1, memberships2.get().count(membership2.get()));
+  EXPECT_EQ(2u, memberships2.get().size());
+  EXPECT_EQ(1u, memberships2.get().count(membership1.get()));
+  EXPECT_EQ(1u, memberships2.get().count(membership2.get()));
 
   process::Future<bool> cancelled;
 

Modified: incubator/mesos/trunk/src/webui/webui.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/webui/webui.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/webui/webui.cpp (original)
+++ incubator/mesos/trunk/src/webui/webui.cpp Fri Aug 24 22:01:21 2012
@@ -38,7 +38,7 @@ static void run(const std::string& direc
 
   argv[0] = const_cast<char*>(path.c_str());
 
-  for (int i = 0; i < args.size(); i++) {
+  for (uint32_t i = 0; i < args.size(); i++) {
     argv[i + 1] = const_cast<char*>(args[i].c_str());
   }
 

Modified: incubator/mesos/trunk/src/zookeeper/group.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/zookeeper/group.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/zookeeper/group.cpp (original)
+++ incubator/mesos/trunk/src/zookeeper/group.cpp Fri Aug 24 22:01:21 2012
@@ -700,7 +700,6 @@ bool GroupProcess::cache()
   }
 
   foreachpair (uint64_t sequence, Promise<bool>* cancelled, utils::copy(unowned)) {
-    Promise<bool>* cancelled = unowned[sequence];
     if (sequences.count(sequence) == 0) {
       cancelled->set(false);
       unowned.erase(sequence); // Okay since iterating over a copy.

Modified: incubator/mesos/trunk/src/zookeeper/url.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/zookeeper/url.hpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/zookeeper/url.hpp (original)
+++ incubator/mesos/trunk/src/zookeeper/url.hpp Fri Aug 24 22:01:21 2012
@@ -62,9 +62,9 @@ private:
   URL(const std::string& credentials,
       const std::string& _servers,
       const std::string& _path)
-    : servers(_servers),
-      path(_path),
-      authentication(Authentication("digest", credentials)) {}
+    : authentication(Authentication("digest", credentials)),
+      servers(_servers),
+      path(_path) {}
 };
 
 

Modified: incubator/mesos/trunk/src/zookeeper/zookeeper.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/zookeeper/zookeeper.cpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/src/zookeeper/zookeeper.cpp (original)
+++ incubator/mesos/trunk/src/zookeeper/zookeeper.cpp Fri Aug 24 22:01:21 2012
@@ -163,8 +163,11 @@ public:
   ZooKeeperImpl(ZooKeeper* zk,
                 const string& servers,
                 const milliseconds& timeout,
-		Watcher* watcher)
-    : zk(zk), servers(servers), timeout(timeout), watcher(watcher)
+		            Watcher* watcher)
+    : servers(servers),
+      timeout(timeout),
+      zk(zk),
+      watcher(watcher)
   {
     if (watcher == NULL) {
       LOG(FATAL) << "Cannot instantiate ZooKeeper with NULL watcher";

Modified: incubator/mesos/trunk/third_party/libprocess/include/process/protobuf.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/include/process/protobuf.hpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/include/process/protobuf.hpp (original)
+++ incubator/mesos/trunk/third_party/libprocess/include/process/protobuf.hpp Fri Aug 24 22:01:21 2012
@@ -403,8 +403,8 @@ struct Protocol
       const Req& req) const
   {
     // Help debugging by adding some "type constraints".
-    { Req* req = NULL; google::protobuf::Message* m = req; }
-    { Res* res = NULL; google::protobuf::Message* m = res; }
+    { Req* req = NULL; google::protobuf::Message* m = req; (void)m; }
+    { Res* res = NULL; google::protobuf::Message* m = res; (void)m; }
 
     ReqResProcess<Req, Res>* process = new ReqResProcess<Req, Res>(pid, req);
     process::spawn(process, true);

Modified: incubator/mesos/trunk/third_party/libprocess/include/stout/cache.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/include/stout/cache.hpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/include/stout/cache.hpp (original)
+++ incubator/mesos/trunk/third_party/libprocess/include/stout/cache.hpp Fri Aug 24 22:01:21 2012
@@ -124,6 +124,7 @@ std::ostream& operator << (
     CHECK(i2 != c.values.end());
     stream << *i2 << std::endl;
   }
+  return stream;
 }
 
 #endif // __STOUT_CACHE_HPP__

Modified: incubator/mesos/trunk/third_party/libprocess/include/stout/os.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/include/stout/os.hpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/include/stout/os.hpp (original)
+++ incubator/mesos/trunk/third_party/libprocess/include/stout/os.hpp Fri Aug 24 22:01:21 2012
@@ -33,8 +33,9 @@
 #include "try.hpp"
 
 #ifdef __APPLE__
+// Assigning the result pointer to ret silences an unused var warning.
 #define gethostbyname2_r(name, af, ret, buf, buflen, result, h_errnop)  \
-  ({ *(result) = gethostbyname2(name, af); 0; })
+  ({ (void)ret; *(result) = gethostbyname2(name, af); 0; })
 #endif // __APPLE__
 
 namespace os {
@@ -179,8 +180,9 @@ inline Try<bool> write(int fd, const std
     return Try<bool>::error(strerror(errno));
   }
 
-  CHECK(length != 0);
-  CHECK(length == message.length()); // TODO(benh): Handle a non-blocking fd?
+  CHECK(length > 0);
+  // TODO(benh): Handle a non-blocking fd?
+  CHECK(static_cast<size_t>(length) == message.length());
 
   return true;
 }

Modified: incubator/mesos/trunk/third_party/libprocess/include/stout/strings.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/include/stout/strings.hpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/include/stout/strings.hpp (original)
+++ incubator/mesos/trunk/third_party/libprocess/include/stout/strings.hpp Fri Aug 24 22:01:21 2012
@@ -119,7 +119,7 @@ inline bool checkBracketsMatching(
     const char closeBracket)
 {
   int count = 0;
-  for (int i = 0; i < s.length(); i++) {
+  for (size_t i = 0; i < s.length(); i++) {
     if (s[i] == openBracket) {
       count++;
     } else if (s[i] == closeBracket) {

Modified: incubator/mesos/trunk/third_party/libprocess/include/stout/time.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/include/stout/time.hpp?rev=1377133&r1=1377132&r2=1377133&view=diff
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/include/stout/time.hpp (original)
+++ incubator/mesos/trunk/third_party/libprocess/include/stout/time.hpp Fri Aug 24 22:01:21 2012
@@ -219,6 +219,8 @@ inline Try<seconds> seconds::parse(const
       return Try<seconds>::error("Unknown duration unit '" + unit + "'");
     }
   }
+
+  return Try<seconds>::error("Invalid duration string.");
 }