Skip to content

Commit 168095c

Browse files
nobubyroot
authored andcommitted
Fix unused-but-set-global warnings in clang-23
1 parent fa69e94 commit 168095c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

ext/json/ext/parser/parser.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
static VALUE mJSON, eNestingError, eParserError, Encoding_UTF_8;
66
static VALUE CNaN, CInfinity, CMinusInfinity, JSON_empty_string;
77

8-
static ID i_new, i_try_convert, i_uminus, i_encode, i_at_line, i_at_column;
8+
static ID i_new, i_try_convert, i_encode, i_at_line, i_at_column;
9+
#ifndef HAVE_RB_STR_TO_INTERNED_STR
10+
static ID i_uminus;
11+
#endif
912

1013
static VALUE sym_max_nesting, sym_allow_nan, sym_allow_trailing_comma, sym_allow_comments,
1114
sym_allow_control_characters, sym_allow_invalid_escape, sym_symbolize_names,
@@ -2812,7 +2815,9 @@ void Init_parser(void)
28122815

28132816
i_new = rb_intern("new");
28142817
i_try_convert = rb_intern("try_convert");
2818+
#ifndef HAVE_RB_STR_TO_INTERNED_STR
28152819
i_uminus = rb_intern("-@");
2820+
#endif
28162821
i_encode = rb_intern("encode");
28172822
i_at_line = rb_intern("@line");
28182823
i_at_column = rb_intern("@column");

0 commit comments

Comments
 (0)