From ec6f46c05dfdf5bd7ef5c9a36ea1751ff564b2ef Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Thu, 7 Jan 2021 11:49:50 +0900 Subject: Use `nint()` for implicit cast; ref #5260 --- mrbgems/mruby-compiler/core/parse.y | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'mrbgems/mruby-compiler/core/parse.y') diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index 4f2e30931..c5d40375c 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -4247,7 +4247,7 @@ peekc_n(parser_state *p, int n) list = push(list, nint(c0)); } while(n--); if (p->pb) { - p->pb = append((node*)list, p->pb); + p->pb = append(list, p->pb); } else { p->pb = list; @@ -4770,7 +4770,7 @@ parse_string(parser_state *p) node *nd = new_str(p, tok(p), toklen(p)); pylval.nd = nd; if (unindent && head) { - nspaces = push(nspaces, (node*)spaces); + nspaces = push(nspaces, nint(spaces)); heredoc_push_indented(p, hinf, nd->cdr, escaped, nspaces, empty && line_head); } return tHD_STRING_MID; @@ -4805,8 +4805,8 @@ parse_string(parser_state *p) p->lineno++; p->column = 0; if (unindent) { - nspaces = push(nspaces, (node*)spaces); - escaped = push(escaped, (node*)pos); + nspaces = push(nspaces, nint(spaces)); + escaped = push(escaped, nint(pos)); pos--; empty = TRUE; spaces = 0; @@ -4864,7 +4864,7 @@ parse_string(parser_state *p) pylval.nd = nd; if (hinf) { if (unindent && head) { - nspaces = push(nspaces, (node*)spaces); + nspaces = push(nspaces, nint(spaces)); heredoc_push_indented(p, hinf, nd->cdr, escaped, nspaces, FALSE); } hinf->line_head = FALSE; @@ -5004,7 +5004,7 @@ number_literal_suffix(parser_state *p) if (!ISASCII(c) || ISALPHA(c) || c == '_') { p->column = column; if (p->pb) { - p->pb = append((node*)list, p->pb); + p->pb = append(list, p->pb); } else { p->pb = list; -- cgit v1.2.3