Skip to content

Commit 98370f2

Browse files
committed
Suppress unused variable warning
1 parent 9ef71ec commit 98370f2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test_multiple_interpreters/mod_per_interpreter_gil_with_singleton.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,15 @@ class MySingleton {
5151
static void init() {
5252
// Ensure the singleton is created
5353
auto &instance = get_instance();
54+
(void) instance; // suppress unused variable warning
5455
assert(instance.objects.size() == 7);
5556
// Register cleanup at interpreter exit
5657
py::module_::import("atexit").attr("register")(py::cpp_function(&MySingleton::clear));
5758
}
5859

5960
static void clear() {
6061
auto &instance = get_instance();
62+
(void) instance; // suppress unused variable warning
6163
assert(instance.objects.size() == 7);
6264
for (const auto &obj : instance.objects) {
6365
obj.dec_ref();

0 commit comments

Comments
 (0)