From a7162c81e7941aad26212926e8ae15c41e918132 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 4 May 2017 09:47:33 +0800 Subject: [PATCH] librbd: silence -Wunused-variable warning Signed-off-by: Kefu Chai --- src/librbd/librbd.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/librbd/librbd.cc b/src/librbd/librbd.cc index 8094433ee5f..77d272283e5 100644 --- a/src/librbd/librbd.cc +++ b/src/librbd/librbd.cc @@ -569,11 +569,13 @@ namespace librbd { tracepoint(librbd, trash_list_enter, io_ctx.get_pool_name().c_str(), io_ctx.get_id()); int r = librbd::trash_list(io_ctx, entries); +#ifdef WITH_LTTNG if (r >= 0) { for (const auto& entry : entries) { tracepoint(librbd, trash_list_entry, entry.id.c_str()); } } +#endif tracepoint(librbd, trash_list_exit, r, r); return r; }