From 971b552735f46cbda7345e8de60a2037ee10e259 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Thu, 11 Apr 2024 17:31:08 -0700 Subject: [PATCH] [PRISM] Suppress compiler warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ../prism_compile.c: In function ‘pm_compile_node’: ../compile.c:583:24: warning: ‘retry_end_l’ may be used uninitialized in this function [-Wmaybe-uninitialized] 583 | anchor->last->next = elem; | ~~~~~~~~~~~~~~~~~~~^~~~~~ In file included from ../compile.c:14256: ../prism_compile.c:5796:16: note: ‘retry_end_l’ was declared here 5796 | LABEL *retry_end_l; | ^~~~~~~~~~~ ../compile.c:255:42: warning: ‘retry_label’ may be used uninitialized in this function [-Wmaybe-uninitialized] 255 | #define LABEL_REF(label) ((label)->refcnt++) | ^~ In file included from ../compile.c:14256: ../prism_compile.c:5795:16: note: ‘retry_label’ was declared here 5795 | LABEL *retry_label; | ^~~~~~~~~~~ ../prism_compile.c:5919:52: warning: ‘previous_block’ may be used uninitialized in this function [-Wmaybe-uninitialized] 5919 | ISEQ_COMPILE_DATA(iseq)->current_block = previous_block; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ --- prism_compile.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prism_compile.c b/prism_compile.c index 8acf3515e5..2c50c19c1d 100644 --- a/prism_compile.c +++ b/prism_compile.c @@ -5791,9 +5791,9 @@ pm_compile_node(rb_iseq_t *iseq, const pm_node_t *node, LINK_ANCHOR *const ret, const pm_forwarding_super_node_t *cast = (const pm_forwarding_super_node_t *) node; const rb_iseq_t *block = NULL; - const rb_iseq_t *previous_block; - LABEL *retry_label; - LABEL *retry_end_l; + const rb_iseq_t *previous_block = NULL; + LABEL *retry_label = NULL; + LABEL *retry_end_l = NULL; if (cast->block != NULL) { previous_block = ISEQ_COMPILE_DATA(iseq)->current_block;