From: Dmitry Yatsushkevich Date: Wed, 25 Mar 2015 20:42:06 +0000 (-0700) Subject: rbd cli: remove erroneous arg for ceph_argparse_witharg X-Git-Tag: v9.0.0~57^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b491c820bb42a6abbe3126eb26d356d37049f053;p=ceph.git rbd cli: remove erroneous arg for ceph_argparse_witharg Remove erroneous arg for ceph_argparse_witharg call when '--io-pattern' parsed: the name look up will point the compiler to bool ceph_argparse_witharg( std::vector &args, std::vector::iterator &i, std::string *ret, ...) when compiler is resolving this function call. The &err argument will be wrongly interpreted as a char * variable to be compared with the argument name pointed by i. Signed-off-by: Dmitry Yatsushkevich --- diff --git a/src/rbd.cc b/src/rbd.cc index 55f29400c6c..2469d10846f 100644 --- a/src/rbd.cc +++ b/src/rbd.cc @@ -2752,7 +2752,7 @@ int main(int argc, const char **argv) } } else if (ceph_argparse_withlonglong(args, i, &bench_io_threads, &err, "--io-threads", (char*)NULL)) { } else if (ceph_argparse_withlonglong(args, i, &bench_bytes, &err, "--io-total", (char*)NULL)) { - } else if (ceph_argparse_witharg(args, i, &bench_pattern, &err, "--io-pattern", (char*)NULL)) { + } else if (ceph_argparse_witharg(args, i, &bench_pattern, "--io-pattern", (char*)NULL)) { } else if (ceph_argparse_witharg(args, i, &val, "--path", (char*)NULL)) { path = strdup(val.c_str()); } else if (ceph_argparse_witharg(args, i, &val, "--dest", (char*)NULL)) {