Enabled warnings=errors for GCC and then made things compile. Had to turn off
[awesomized/libmemcached] / libmemcached / memcached_analyze.c
index 6e5f54e7e10850b36b730eb83a3bc080dff9cb0d..1063fb277237b143e7ba162d0ba3e5b98e118aef 100644 (file)
@@ -27,7 +27,7 @@ static void calc_least_free_node(memcached_analysis_st *result,
                                  const long max_allowed_bytes,
                                  const long used_bytes)
 {
-  long remaining_bytes= max_allowed_bytes - used_bytes;
+  uint64_t remaining_bytes= (uint64_t)max_allowed_bytes - used_bytes;
 
   if (result->least_remaining_bytes == 0 ||
       remaining_bytes < result->least_remaining_bytes)