Remove various unused variables
PATCH 1/1 Remove various unused variables
Signed-off-by Wido den Hollander <[email protected]>
--- src/client/Client.cc | 2 -- src/include/addr_parsing.c | 3 +-- src/librados.cc | 12 ------------ src/osd/OSD.cc | 2 -- 4 files changed, 1 insertions(+), 18 deletions(-)
src/client/Client.cc +0 -2
@@ -466,9 +466,7 @@ Inode * Client::add_update_inode(InodeStat *st, utime_t from, int mds) } else { in = new Inode(cct, st->vino, &st->layout); inode_map[st->vino] = in; - bool new_root = false; if (!root) { - new_root = true; root = in; cwd = root; cwd->get();
src/include/addr_parsing.c +1 -2
@@ -42,14 +42,13 @@ int safe_cat(char **pstr, int *plen, int pos, const char *str2)char *resolve_addrs (const char *orig_str) {char *new_str; -char *tok, *p, *port_str, *saveptr =NULL ; +char *tok, *port_str, *saveptr =NULL ;int len, pos;char *buf =strdup (orig_str); len =BUF_SIZE ; new_str = (char *)malloc (len); - p = new_str; pos =0 ; tok =strtok_r (buf,"," , &saveptr);
src/librados.cc +0 -12
@@ -1732,8 +1732,6 @@ int librados::RadosClient::operate(IoCtxImpl& io, const object_t& oid, int librados::RadosClient::operate_read(IoCtxImpl& io, const object_t& oid, ::ObjectOperation *o, bufferlist *pbl) { - utime_t ut = ceph_clock_now(cct); - /* can't write to a snapshot */ if (io.snap_seq != CEPH_NOSNAP) return -EINVAL;
@@ -2042,8 +2040,6 @@ int librados::RadosClient::tmap_put(IoCtxImpl& io, const object_t& oid, bufferli int librados::RadosClient::tmap_get(IoCtxImpl& io, const object_t& oid, bufferlist& bl) { - utime_t ut = ceph_clock_now(cct); - /* can't write to a snapshot */ if (io.snap_seq != CEPH_NOSNAP) return -EROFS;
@@ -2079,8 +2075,6 @@ int librados::RadosClient::exec(IoCtxImpl& io, const object_t& oid, const char *cls, const char *method, bufferlist& inbl, bufferlist& outbl) { - utime_t ut = ceph_clock_now(cct); - Mutex mylock("RadosClient::exec::mylock"); Cond cond; bool done;
@@ -2420,8 +2414,6 @@ void librados::RadosClient::watch_notify(MWatchNotify *m) int librados::RadosClient::watch(IoCtxImpl& io, const object_t& oid, uint64_t ver, uint64_t *cookie, librados::WatchCtx *ctx) { - utime_t ut = ceph_clock_now(cct); - ::ObjectOperation rd; Mutex mylock("RadosClient::watch::mylock"); Cond cond;
@@ -2461,8 +2453,6 @@ int librados::RadosClient::watch(IoCtxImpl& io, const object_t& oid, uint64_t ve int librados::RadosClient::_notify_ack(IoCtxImpl& io, const object_t& oid, uint64_t notify_id, uint64_t ver) { - utime_t ut = ceph_clock_now(cct); - Mutex mylock("RadosClient::watch::mylock"); Cond cond; eversion_t objver;
@@ -2477,7 +2467,6 @@ int librados::RadosClient::_notify_ack(IoCtxImpl& io, const object_t& oid, int librados::RadosClient::unwatch(IoCtxImpl& io, const object_t& oid, uint64_t cookie) { - utime_t ut = ceph_clock_now(cct); bufferlist inbl, outbl; Mutex mylock("RadosClient::watch::mylock");
@@ -2508,7 +2497,6 @@ int librados::RadosClient::unwatch(IoCtxImpl& io, const object_t& oid, uint64_t int librados::RadosClient::notify(IoCtxImpl& io, const object_t& oid, uint64_t ver, bufferlist& bl) { - utime_t ut = ceph_clock_now(cct); bufferlist inbl, outbl; Mutex mylock("RadosClient::notify::mylock");
src/osd/OSD.cc +0 -2
@@ -1437,8 +1437,6 @@ void OSD::update_heartbeat_peers() old_from.swap(heartbeat_from); old_con.swap(heartbeat_from_con); - utime_t now = ceph_clock_now(g_ceph_context); - heartbeat_epoch = osdmap->get_epoch(); // build heartbeat from set
Signature · 1 line
1.7.5.4