]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd cli: remove erroneous arg for ceph_argparse_witharg
authorDmitry Yatsushkevich <dyatsushkevich@mirantis.com>
Wed, 25 Mar 2015 20:42:06 +0000 (13:42 -0700)
committerDmitry Yatsushkevich <dyatsushkevich@mirantis.com>
Tue, 31 Mar 2015 19:13:55 +0000 (12:13 -0700)
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<const char*> &args,
    std::vector<const char*>::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 <dyatsushkevich@mirantis.com>
src/rbd.cc

index 55f29400c6c6c4b744cfe086ce91d64cad13defd..2469d10846ffeb07e5cfdbd373482c465226a2f9 100644 (file)
@@ -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)) {