X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Ftest.c;h=78fe4a70ff8b284ee4db96e3256ef4eed46135bb;hb=20502c526be080e3ffee3c542eac4d1ada382fd8;hp=6c6bea645c4da1376069b70ef387e48a97447ccf;hpb=540b884236fe1e2d5e6cd52c70881d74e0fcea63;p=awesomized%2Flibmemcached diff --git a/tests/test.c b/tests/test.c index 6c6bea64..78fe4a70 100644 --- a/tests/test.c +++ b/tests/test.c @@ -2,7 +2,6 @@ Sample test application. */ #include -#include #include #include #include @@ -15,13 +14,13 @@ #include "test.h" -long int timedif(struct timeval a, struct timeval b) +static 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; } @@ -45,6 +44,8 @@ int main(int argc, char *argv[]) if (world.create) world_ptr= world.create(); + else + world_ptr= NULL; startup_ptr= (server_startup_st *)world_ptr; servers= (memcached_server_st *)startup_ptr->servers; @@ -98,7 +99,6 @@ int main(int argc, char *argv[]) if (next->pre) { - memcached_return rc; rc= next->pre(memc); if (rc != MEMCACHED_SUCCESS)