projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Flush does not reset the bytes stat, so we have no idea of the value
[m6w6/libmemcached]
/
tests
/
function.c
diff --git
a/tests/function.c
b/tests/function.c
index e87aa28a26dcfdd20506d7de1b62cc02024ba0b0..13574427de8b0075a0af511804a16db6841ae768 100644
(file)
--- a/
tests/function.c
+++ b/
tests/function.c
@@
-4521,14
+4521,14
@@
static test_return regression_bug_434843(memcached_st *memc)
*/
uint32_t number_of_hosts= memc->number_of_hosts;
memc->number_of_hosts= 1;
*/
uint32_t number_of_hosts= memc->number_of_hosts;
memc->number_of_hosts= 1;
- const
in
t max_keys= 10240;
+ const
size_
t max_keys= 10240;
char **keys= calloc(max_keys, sizeof(char*));
size_t *key_length=calloc(max_keys, sizeof(size_t));
char **keys= calloc(max_keys, sizeof(char*));
size_t *key_length=calloc(max_keys, sizeof(size_t));
- for (int x= 0; x < max_keys; ++x)
+ for (int x= 0; x <
(int)
max_keys; ++x)
{
char k[251];
{
char k[251];
- key_length[x]= snprintf(k, sizeof(k), "0200%u", x);
+ key_length[x]=
(size_t)
snprintf(k, sizeof(k), "0200%u", x);
keys[x]= strdup(k);
assert(keys[x] != NULL);
}
keys[x]= strdup(k);
assert(keys[x] != NULL);
}
@@
-4547,7
+4547,7
@@
static test_return regression_bug_434843(memcached_st *memc)
/* The first iteration should give me a 100% cache miss. verify that*/
assert(counter == 0);
char blob[1024];
/* The first iteration should give me a 100% cache miss. verify that*/
assert(counter == 0);
char blob[1024];
- for (int x= 0; x < max_keys; ++x)
+ for (int x= 0; x <
(int)
max_keys; ++x)
{
rc= memcached_add(memc, keys[x], key_length[x],
blob, sizeof(blob), 0, 0);
{
rc= memcached_add(memc, keys[x], key_length[x],
blob, sizeof(blob), 0, 0);
@@
-4557,12
+4557,12
@@
static test_return regression_bug_434843(memcached_st *memc)
else
{
/* Verify that we received all of the key/value pairs */
else
{
/* Verify that we received all of the key/value pairs */
-
assert(counter ==
max_keys);
+
assert(counter == (unsigned int)
max_keys);
}
}
/* Release allocated resources */
}
}
/* Release allocated resources */
- for (
in
t x= 0; x < max_keys; ++x)
+ for (
size_
t x= 0; x < max_keys; ++x)
free(keys[x]);
free(keys);
free(key_length);
free(keys[x]);
free(keys);
free(key_length);
@@
-4599,11
+4599,6
@@
static test_return regression_bug_421108(memcached_st *memc)
assert(rc == MEMCACHED_SUCCESS);
assert(bytes_written != NULL);
assert(rc == MEMCACHED_SUCCESS);
assert(bytes_written != NULL);
- /*
- * We did a flush before running the test, so bytes should be 0, but
- * bytes_read and butes_written cannot be zero ;-)
- */
- assert(strcmp(bytes, "0") == 0);
assert(strcmp(bytes, bytes_read) != 0);
assert(strcmp(bytes, bytes_written) != 0);
assert(strcmp(bytes, bytes_read) != 0);
assert(strcmp(bytes, bytes_written) != 0);