From b491c820bb42a6abbe3126eb26d356d37049f053 Mon Sep 17 00:00:00 2001 From: Dmitry Yatsushkevich Date: Wed, 25 Mar 2015 13:42:06 -0700 Subject: [PATCH] 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 --- src/rbd.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rbd.cc b/src/rbd.cc index 55f29400c6c6c..2469d10846ffe 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)) { -- 2.39.5