mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parse.y: fix compile_error format
* parse.y (ripper_compile_error, parser_compile_error): declare as PRINTF_ARGS attribute. * parse.y (id_is_var_gen): fix format specifier for string value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9c5c31c8b7
commit
27ed9f1d29
1 changed files with 3 additions and 3 deletions
6
parse.y
6
parse.y
|
@ -843,7 +843,7 @@ static ID id_warn, id_warning, id_gets;
|
|||
# else
|
||||
# define WARNING_CALL rb_funcall
|
||||
# endif
|
||||
static void ripper_compile_error(struct parser_params*, const char *fmt, ...);
|
||||
PRINTF_ARGS(static void ripper_compile_error(struct parser_params*, const char *fmt, ...), 2, 3);
|
||||
# define compile_error ripper_compile_error
|
||||
# define PARSER_ARG parser,
|
||||
#else
|
||||
|
@ -857,7 +857,7 @@ static void ripper_compile_error(struct parser_params*, const char *fmt, ...);
|
|||
# define WARNING_ARGS(fmt,n) WARN_ARGS(fmt,n)
|
||||
# define WARNING_ARGS_L(l,fmt,n) WARN_ARGS_L(l,fmt,n)
|
||||
# define WARNING_CALL rb_compile_warning
|
||||
static void parser_compile_error(struct parser_params*, const char *fmt, ...);
|
||||
PRINTF_ARGS(static void parser_compile_error(struct parser_params*, const char *fmt, ...), 2, 3);
|
||||
# define compile_error parser_compile_error
|
||||
# define PARSER_ARG parser,
|
||||
#endif
|
||||
|
@ -9001,7 +9001,7 @@ id_is_var_gen(struct parser_params *parser, ID id)
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
compile_error(PARSER_ARG "identifier %s is not valid to get", rb_id2str(id));
|
||||
compile_error(PARSER_ARG "identifier %"PRIsVALUE" is not valid to get", rb_id2str(id));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue