mirror of
https://github.com/python/cpython
synced 2026-09-28 06:48:18 +03:00
Silence compiler warnings in gc.c (#117422)
This commit is contained in:
parent
179869af92
commit
ddf814db74
1 changed files with 3 additions and 0 deletions
|
|
@ -1317,6 +1317,7 @@ gc_collect_young(PyThreadState *tstate,
|
||||||
survivor_count++;
|
survivor_count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
(void)survivor_count; // Silence compiler warning
|
||||||
gc_list_merge(&survivors, visited);
|
gc_list_merge(&survivors, visited);
|
||||||
validate_old(gcstate);
|
validate_old(gcstate);
|
||||||
gcstate->young.count = 0;
|
gcstate->young.count = 0;
|
||||||
|
|
@ -1329,12 +1330,14 @@ gc_collect_young(PyThreadState *tstate,
|
||||||
add_stats(gcstate, 0, stats);
|
add_stats(gcstate, 0, stats);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
static inline int
|
static inline int
|
||||||
IS_IN_VISITED(PyGC_Head *gc, int visited_space)
|
IS_IN_VISITED(PyGC_Head *gc, int visited_space)
|
||||||
{
|
{
|
||||||
assert(visited_space == 0 || flip_old_space(visited_space) == 0);
|
assert(visited_space == 0 || flip_old_space(visited_space) == 0);
|
||||||
return gc_old_space(gc) == visited_space;
|
return gc_old_space(gc) == visited_space;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
struct container_and_flag {
|
struct container_and_flag {
|
||||||
PyGC_Head *container;
|
PyGC_Head *container;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue