X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fatomsmasher.c;h=3b4879df4bef1c1c260935867fbfbae4ad42f94f;hb=20502c526be080e3ffee3c542eac4d1ada382fd8;hp=500e2e8e1aaec308c39a541dad30ad6609344587;hpb=a07bb255b72aa59d0f4c4c63bb71695b2e9df537;p=awesomized%2Flibmemcached diff --git a/tests/atomsmasher.c b/tests/atomsmasher.c index 500e2e8e..3b4879df 100644 --- a/tests/atomsmasher.c +++ b/tests/atomsmasher.c @@ -73,8 +73,8 @@ infinite: uint32_t test_bit; uint8_t which; - test_bit= random() % GLOBAL_COUNT; - which= random() % 2; + test_bit= (uint32_t)(random() % GLOBAL_COUNT); + which= (uint8_t)(random() % 2); if (which == 0) { @@ -156,8 +156,8 @@ static memcached_return enable_consistent(memcached_st *memc) static test_return add_test(memcached_st *memc) { memcached_return rc; - char *key= "foo"; - char *value= "when we sanitize"; + const char *key= "foo"; + const char *value= "when we sanitize"; unsigned long long setting_value; setting_value= memcached_behavior_get(memc, MEMCACHED_BEHAVIOR_NO_BLOCK); @@ -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);