From 75b2067cef2b97947f486085d8958f8fa628ca97 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Sun, 7 May 2023 21:16:40 -0400 Subject: [PATCH] btrfs-tree: fix build on clang++16 The "loops" variable isn't read (only set) if not built with extra debug code. Signed-off-by: Zygo Blaxell --- lib/btrfs-tree.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/btrfs-tree.cc b/lib/btrfs-tree.cc index 97bb522..d597d68 100644 --- a/lib/btrfs-tree.cc +++ b/lib/btrfs-tree.cc @@ -548,7 +548,7 @@ namespace crucible { #endif const uint64_t logical_end = logical + count * block_size(); BtrfsTreeItem bti = rlower_bound(logical); - size_t loops = 0; + size_t __attribute__((unused)) loops = 0; BCTFGS_DEBUG("get_sums " << to_hex(logical) << ".." << to_hex(logical_end) << endl); while (!!bti) { BCTFGS_DEBUG("get_sums[" << loops << "]: " << bti << endl);