From: Kefu Chai Date: Sat, 8 Jul 2017 12:19:53 +0000 (+0800) Subject: os/bluestore: do not assign to never-read variable X-Git-Tag: v12.1.1~80^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c6fdebb4bb248bd96ff3d0419a675ac7cb6fc47b;p=ceph.git os/bluestore: do not assign to never-read variable this silences the clang analyzer warnings like: Value stored to 'p' is never read Signed-off-by: Kefu Chai --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 7c9933c0213..bd935d4e0e3 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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; }