X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=clients%2Fmemstat.c;h=847e7f0d0ee8eeb8763ca07158a34705ff67e57e;hb=9141e90dccb732d6e7ef10ea248ce2fd7d1ef46b;hp=27c34a41c2caf4ad048c3bb4f8320cfe5950142a;hpb=17e0b84e30fe82f6a2a995484a502179c73906ea;p=m6w6%2Flibmemcached diff --git a/clients/memstat.c b/clients/memstat.c index 27c34a41..847e7f0d 100644 --- a/clients/memstat.c +++ b/clients/memstat.c @@ -35,13 +35,13 @@ static char *analyze_mode= NULL; static struct option long_options[]= { - {"version", no_argument, NULL, OPT_VERSION}, - {"help", no_argument, NULL, OPT_HELP}, - {"verbose", no_argument, &opt_verbose, OPT_VERBOSE}, - {"debug", no_argument, &opt_verbose, OPT_DEBUG}, - {"servers", required_argument, NULL, OPT_SERVERS}, - {"flag", no_argument, &opt_displayflag, OPT_FLAG}, - {"analyze", optional_argument, NULL, OPT_ANALYZE}, + {(OPTIONSTRING)"version", no_argument, NULL, OPT_VERSION}, + {(OPTIONSTRING)"help", no_argument, NULL, OPT_HELP}, + {(OPTIONSTRING)"verbose", no_argument, &opt_verbose, OPT_VERBOSE}, + {(OPTIONSTRING)"debug", no_argument, &opt_verbose, OPT_DEBUG}, + {(OPTIONSTRING)"servers", required_argument, NULL, OPT_SERVERS}, + {(OPTIONSTRING)"flag", no_argument, &opt_displayflag, OPT_FLAG}, + {(OPTIONSTRING)"analyze", optional_argument, NULL, OPT_ANALYZE}, {0, 0, 0, 0}, }; @@ -168,12 +168,12 @@ static void run_analyzer(memcached_st *memc, memcached_stat_st *memc_stat, } gettimeofday(&end_time, NULL); - elapsed_time= timedif(end_time, start_time); - elapsed_time /= num_of_tests; + elapsed_time= (long) timedif(end_time, start_time); + elapsed_time /= (long) num_of_tests; if (elapsed_time > slowest_time) { - slowest_server= x; + slowest_server= (long)x; slowest_time= elapsed_time; }