]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: do not assign to never-read variable
authorKefu Chai <kchai@redhat.com>
Sat, 8 Jul 2017 12:19:53 +0000 (20:19 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 8 Jul 2017 12:20:05 +0000 (20:20 +0800)
this silences the clang analyzer warnings like:

Value stored to 'p' is never read

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/os/bluestore/BlueStore.cc

index 7c9933c0213ff608022f257c138b95687dd91d84..bd935d4e0e3a1536068e468058d970f42813cf2f 100644 (file)
@@ -317,7 +317,7 @@ static int get_key_shared_blob(const string& key, uint64_t *sbid)
   const char *p = key.c_str();
   if (key.length() < sizeof(uint64_t))
     return -1;
-  p = _key_decode_u64(p, sbid);
+  _key_decode_u64(p, sbid);
   return 0;
 }
 
@@ -484,7 +484,7 @@ int get_key_extent_shard(const string& key, string *onode_key, uint32_t *offset)
   int okey_len = key.size() - sizeof(uint32_t) - 1;
   *onode_key = key.substr(0, okey_len);
   const char *p = key.data() + okey_len;
-  p = _key_decode_u32(p, offset);
+  _key_decode_u32(p, offset);
   return 0;
 }