зеркало из https://github.com/github/ruby.git
Remove unnecessary local variable
newline is always "\n" when it is used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8952525a8e
Коммит
8415df619e
9
parse.y
9
parse.y
|
@ -4666,7 +4666,7 @@ parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
|
|||
const int max_line_margin = 30;
|
||||
const char *ptr, *ptr_end, *pt, *pb;
|
||||
const char *pre = "", *post = "", *pend;
|
||||
const char *code = "", *caret = "", *newline = "";
|
||||
const char *code = "", *caret = "";
|
||||
const char *lim;
|
||||
char *buf;
|
||||
long len;
|
||||
|
@ -4757,10 +4757,9 @@ parser_yyerror(struct parser_params *p, const YYLTYPE *yylloc, const char *msg)
|
|||
p2 += (lim - ptr);
|
||||
}
|
||||
*p2 = '\0';
|
||||
newline = "\n";
|
||||
compile_error(p, "%s%s""%s%.*s%s%s""%s%s",
|
||||
msg, newline,
|
||||
pre, (int)len, code, post, newline,
|
||||
compile_error(p, "%s\n""%s%.*s%s\n""%s%s",
|
||||
msg,
|
||||
pre, (int)len, code, post,
|
||||
pre, caret);
|
||||
}
|
||||
#else
|
||||
|
|
Загрузка…
Ссылка в новой задаче