File 0711-erts-Fix-warning-about-set-but-unused-variable.patch of Package erlang
From 3ad9e8140f22d4878e05a9304e91a2a93c097ae4 Mon Sep 17 00:00:00 2001
From: Frej Drejhammar <frej.drejhammar@gmail.com>
Date: Thu, 6 Apr 2023 10:09:43 +0200
Subject: [PATCH] erts: Fix warning about set but unused variable
When assertions are disabled, `offset` is set but not used and Clang
warns about it. Add a `(void)object` after the assert to silence the
warning.
---
erts/emulator/beam/hash.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/erts/emulator/beam/hash.c b/erts/emulator/beam/hash.c
index 434ba25098..2ab157b2e0 100644
--- a/erts/emulator/beam/hash.c
+++ b/erts/emulator/beam/hash.c
@@ -64,6 +64,7 @@ void hash_get_info(HashInfo *hi, Hash *h)
}
}
ASSERT(objects == h->nobjs);
+ (void)objects;
hi->name = h->name;
hi->size = hash_get_slots(h);
--
2.35.3