From 430082c0134db7d8a82b5316fe9d6d7b766452b4 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 14 Dec 2015 04:47:37 +0000 Subject: parse.y: suppress warnings * parse.y (SET_LEX_STATE): explicit cast to suppress sign-compare warnings in the case restoring from saved num in the parser stack and getting from kwtable state. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index 9791a67f49..9c3e5f9602 100644 --- a/parse.y +++ b/parse.y @@ -95,10 +95,9 @@ enum lex_state_e { #define IS_lex_state_all(ls) IS_lex_state_all_for(lex_state, (ls)) # define SET_LEX_STATE(ls) \ - (lex_state = trace_lex_state(lex_state, (ls), __LINE__)) + (lex_state = (yydebug ? trace_lex_state(lex_state, (ls), __LINE__) : \ + (enum lex_state_e)(ls))) static enum lex_state_e trace_lex_state(enum lex_state_e from, enum lex_state_e to, int line); -# define trace_lex_state(from, to, line) \ - (yydebug ? trace_lex_state(from, to, line) : (to)) typedef VALUE stack_type; @@ -9208,7 +9207,6 @@ append_lex_state_name(enum lex_state_e state, VALUE buf) return buf; } -#undef trace_lex_state static enum lex_state_e trace_lex_state(enum lex_state_e from, enum lex_state_e to, int line) { -- cgit v1.2.3