]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/rados: do not assign never read variable 18015/head
authorKefu Chai <kchai@redhat.com>
Thu, 28 Sep 2017 07:50:46 +0000 (15:50 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 29 Sep 2017 03:01:53 +0000 (11:01 +0800)
actually "r" is always 0 in that branch. so it's a no-op.

this silences the clang analyzer warning of

Value stored to 'r' is never read

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/tools/rados/PoolDump.cc

index ad7a1a4dfefb85406cbf16d5011858ae90da4c5c..405f455e8d349d8e0932f5e199fea40ce1abdf79 100644 (file)
@@ -87,7 +87,6 @@ int PoolDump::dump(IoCtx *io_ctx)
 
       if (outdata.length() < op_size) {
         // No more data
-        r = 0;
         break;
       }
       offset += outdata.length();
@@ -151,7 +150,6 @@ int PoolDump::dump(IoCtx *io_ctx)
       }
       r = values.size();
     } while (r == MAX_READ);
-    r = 0;
 
     // Close object
     // =============