More modifications to the C++ interface. Changing the return type of a
[m6w6/libmemcached] / clients / utilities.c
index 529955ce4662b812d55e8446b9f92e10719306c6..6551684db003f26c0497c80d149d0da1f6f04b3e 100644 (file)
@@ -1,3 +1,4 @@
+#include "libmemcached/common.h"
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
@@ -8,9 +9,9 @@ long int timedif(struct timeval a, struct timeval b)
 {
   register int us, s;
 
-  us = a.tv_usec - b.tv_usec;
+  us = (int)(a.tv_usec - b.tv_usec);
   us /= 1000;
-  s = a.tv_sec - b.tv_sec;
+  s = (int)(a.tv_sec - b.tv_sec);
   s *= 1000;
   return s + us;
 }
@@ -46,6 +47,7 @@ static char *lookup_help(memcached_options option)
   case OPT_BINARY: return("Switch to binary protocol.");
   case OPT_ANALYZE: return("Analyze the provided servers.");
   case OPT_UDP: return("Use UDP protocol when communicating with server.");
+  default: WATCHPOINT_ASSERT(0);
   };
 
   WATCHPOINT_ASSERT(0);