From: Monty Taylor Date: Tue, 7 Jul 2009 21:57:24 +0000 (-0700) Subject: Cleaned up some warnings. X-Git-Tag: 0.31~4^2~7 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=7968ba456c94e012f278f6e27a784550d5d48b04;p=awesomized%2Flibmemcached Cleaned up some warnings. --- diff --git a/libmemcached/memcached.hh b/libmemcached/memcached.hh index 01b95f6b..2f2d519e 100644 --- a/libmemcached/memcached.hh +++ b/libmemcached/memcached.hh @@ -142,20 +142,20 @@ public: value, value_length, 0, 0); } memcached_return cas(const char *key, const char *value, - size_t value_length, uint64_t cas) + size_t value_length, uint64_t cas_arg) { return memcached_cas(&memc, key, strlen(key), - value, value_length, 0, 0, cas); + value, value_length, 0, 0, cas_arg); } memcached_return cas_by_key(const char *master_key, const char *key, const char *value, size_t value_length, - uint64_t cas) + uint64_t cas_arg) { return memcached_cas_by_key(&memc, master_key, strlen(master_key), key, strlen(key), value, value_length, - 0, 0, cas); + 0, 0, cas_arg); } // using 'remove' vs. 'delete' since 'delete' is a keyword memcached_return remove(const char *key) diff --git a/libmemcached/memcached_dump.c b/libmemcached/memcached_dump.c index 4899df56..88fec3a8 100644 --- a/libmemcached/memcached_dump.c +++ b/libmemcached/memcached_dump.c @@ -9,7 +9,7 @@ #include "common.h" static memcached_return ascii_dump(memcached_st *ptr, memcached_dump_func *callback, void *context, uint32_t number_of_callbacks) { - memcached_return rc; + memcached_return rc= 0; char buffer[MEMCACHED_DEFAULT_COMMAND_SIZE]; size_t send_length; uint32_t server_key; diff --git a/tests/atomsmasher.c b/tests/atomsmasher.c index 65a31dd4..eee08d6b 100644 --- a/tests/atomsmasher.c +++ b/tests/atomsmasher.c @@ -173,7 +173,7 @@ static test_return add_test(memcached_st *memc) /* Too many broken OS'es have broken loopback in async, so we can't be sure of the result */ if (setting_value) - assert(rc == MEMCACHED_NOTSTORED || MEMCACHED_STORED); + assert(rc == MEMCACHED_NOTSTORED || rc == MEMCACHED_STORED); else assert(rc == MEMCACHED_NOTSTORED); diff --git a/tests/plus.cpp b/tests/plus.cpp index 4a3789b9..d3674d6c 100644 --- a/tests/plus.cpp +++ b/tests/plus.cpp @@ -53,8 +53,8 @@ uint8_t increment_test(memcached_st *memc) mcach.set(key, inc_value, strlen(inc_value)); ret_value= mcach.get(key, &value_length); printf("\nretvalue %s\n",ret_value); - int_inc_value= atoi(inc_value); - int_ret_value= atoi(ret_value); + int_inc_value= uint64_t(atol(inc_value)); + int_ret_value= uint64_t(atol(ret_value)); assert(int_ret_value == int_inc_value); rc= mcach.increment(key, 1, &int_ret_value);