summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2021-04-01 22:54:42 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-04-01 22:54:42 +0900
commit9513fcd5bc50deed1d60fa7a26a573d48654d9ec (patch)
treec1299f7d6c0869a052a588c1f6d7fbffeb4e75f4 /gc.c
parent68a8f611e01c1e43a7362f590316268ccf7865c5 (diff)
Suppress a warning
Loop variables of `list_for_each` need to be initialized.
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index a13f716d13..fce429c7db 100644
--- a/gc.c
+++ b/gc.c
@@ -3344,7 +3344,7 @@ objspace_each_objects(rb_objspace_t *objspace, each_obj_callback *callback, void
* call the callback over each page that exists in this buffer. Thus it
* is safe for the callback to allocate objects without possibly entering
* an infinte loop. */
- struct heap_page *page;
+ struct heap_page *page = 0;
size_t pages_count = 0;
list_for_each(&heap_eden->pages, page, page_node) {
pages[pages_count] = page;