Unverified Kaydet (Commit) 181835d5 authored tarafından Ivan Levkivskyi's avatar Ivan Levkivskyi Kaydeden (comit) GitHub

Fix compiler warnings about end_col_offset and end_lineno (GH-11735)

üst 5033e315
...@@ -3871,11 +3871,8 @@ static void ...@@ -3871,11 +3871,8 @@ static void
get_last_end_pos(asdl_seq *s, int *end_lineno, int *end_col_offset) get_last_end_pos(asdl_seq *s, int *end_lineno, int *end_col_offset)
{ {
int tot = asdl_seq_LEN(s); int tot = asdl_seq_LEN(s);
// Suite should not be empty, but it is safe to just ignore it // There must be no empty suites.
// if it will ever occur. assert(tot > 0);
if (!tot) {
return;
}
stmt_ty last = asdl_seq_GET(s, tot - 1); stmt_ty last = asdl_seq_GET(s, tot - 1);
*end_lineno = last->end_lineno; *end_lineno = last->end_lineno;
*end_col_offset = last->end_col_offset; *end_col_offset = last->end_col_offset;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment