Skip to content

Commit

Permalink
core: fix -Wunused-but-set-variable
Browse files Browse the repository at this point in the history
When configured with -DSeastar_NUMA=OFF, fix -Wunused-but-set-variable
that triggers with clang-16.

seastar/src/core/memory.cc:1868:12: error: variable 'pos' set but not used [-Werror,-Wunused-but-set-variable]
    size_t pos = 0;

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
  • Loading branch information
dotnwat committed Jul 6, 2024
1 parent 378b776 commit 538767e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/memory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ configure(std::vector<resource::memory> m, bool mbind,
get_cpu_mem().replace_memory_backing(sys_alloc);
}
get_cpu_mem().resize(total, sys_alloc);
size_t pos = 0;
[[maybe_unused]] size_t pos = 0;
for (auto&& x : m) {
#ifdef SEASTAR_HAVE_NUMA
unsigned long nodemask = 1UL << x.nodeid;
Expand Down

0 comments on commit 538767e

Please sign in to comment.