diff options
author | Guido van Rossum <guido@python.org> | 2024-04-01 16:13:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-01 16:13:38 (GMT) |
commit | ddf814db744006e0f42328aa15ace97c9d8ad681 (patch) | |
tree | 20461122bbff4c169e613fd56791efece3f495f0 /Python/gc.c | |
parent | 179869af922252a0c1cef65fd2923856895e7d1b (diff) | |
download | cpython-ddf814db744006e0f42328aa15ace97c9d8ad681.zip cpython-ddf814db744006e0f42328aa15ace97c9d8ad681.tar.gz cpython-ddf814db744006e0f42328aa15ace97c9d8ad681.tar.bz2 |
Silence compiler warnings in gc.c (#117422)
Diffstat (limited to 'Python/gc.c')
-rw-r--r-- | Python/gc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/gc.c b/Python/gc.c index 36e20d0..a37c1b1 100644 --- a/Python/gc.c +++ b/Python/gc.c @@ -1317,6 +1317,7 @@ gc_collect_young(PyThreadState *tstate, survivor_count++; } } + (void)survivor_count; // Silence compiler warning gc_list_merge(&survivors, visited); validate_old(gcstate); gcstate->young.count = 0; @@ -1329,12 +1330,14 @@ gc_collect_young(PyThreadState *tstate, add_stats(gcstate, 0, stats); } +#ifndef NDEBUG static inline int IS_IN_VISITED(PyGC_Head *gc, int visited_space) { assert(visited_space == 0 || flip_old_space(visited_space) == 0); return gc_old_space(gc) == visited_space; } +#endif struct container_and_flag { PyGC_Head *container; |