8000 Silence compiler warnings in gc.c (#117422) · python/cpython@ddf814d · GitHub
[go: up one dir, main page]

Skip to content

Commit ddf814d

Browse files
authored
Silence compiler warnings in gc.c (#117422)
1 parent 179869a commit ddf814d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Python/gc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1317,6 +1317,7 @@ gc_collect_young(PyThreadState *tstate,
13171317
survivor_count++;
13181318
}
13191319
}
1320+
(void)survivor_count; // Silence compiler warning
13201321
gc_list_merge(&survivors, visited);
13211322
validate_old(gcstate);
13221323
gcstate->young.count = 0;
@@ -1329,12 +1330,14 @@ gc_collect_young(PyThreadState *tstate,
13291330
add_stats(gcstate, 0, stats);
13301331
}
13311332

1333+
#ifndef NDEBUG
13321334
static inline int
13331335
IS_IN_VISITED(PyGC_Head *gc, int visited_space)
13341336
{
13351337
assert(visited_space == 0 || flip_old_space(visited_space) == 0);
13361338
return gc_old_space(gc) == visited_space;
13371339
}
1340+
#endif
13381341

13391342
struct container_and_flag {
13401343
PyGC_Head *container;

0 commit comments

Comments
 (0)
0