Skip to content

Commit

Permalink
Merge pull request ceph#27513 from ddiss/librados_silence_unused_vars
Browse files Browse the repository at this point in the history
librbd: silence -Wunused-variable warnings

Reviewed-by: Jason Dillaman <[email protected]>
  • Loading branch information
Jason Dillaman authored Apr 13, 2019
2 parents be4d819 + e22c4d5 commit debb52f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/librbd/librbd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -719,11 +719,13 @@ namespace librbd {
io_ctx.get_id());

int r = librbd::api::Image<>::list_images(io_ctx, images);
#ifdef WITH_LTTNG
if (r >= 0) {
for (auto& it : *images) {
tracepoint(librbd, list_entry, it.name.c_str());
}
}
#endif
tracepoint(librbd, list_exit, r, r);
return r;
}
Expand Down Expand Up @@ -1796,13 +1798,14 @@ namespace librbd {
ictx->snap_name.c_str(), ictx->read_only);

int r = librbd::api::Image<>::list_children(ictx, images);
#ifdef WITH_LTTNG
if (r >= 0) {
for (auto& it : *images) {
tracepoint(librbd, list_children_entry, it.pool_name.c_str(),
it.image_name.c_str());
}
}

#endif
tracepoint(librbd, list_children_exit, r);
return r;
}
Expand Down Expand Up @@ -2589,11 +2592,13 @@ namespace librbd {
ImageCtx *ictx = (ImageCtx *)ctx;
tracepoint(librbd, list_watchers_enter, ictx, ictx->name.c_str(), ictx->snap_name.c_str(), ictx->read_only);
int r = librbd::list_watchers(ictx, watchers);
#ifdef WITH_LTTNG
if (r >= 0) {
for (auto &watcher : watchers) {
tracepoint(librbd, list_watchers_entry, watcher.addr.c_str(), watcher.id, watcher.cookie);
}
}
#endif
tracepoint(librbd, list_watchers_exit, r, watchers.size());
return r;
}
Expand Down

0 comments on commit debb52f

Please sign in to comment.