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

This commit is contained in:
Ivan Levkivskyi 2019-02-10 15:39:49 +00:00 committed by GitHub
parent 5033e315d2
commit 181835d5a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 5 deletions

View File

@ -3871,11 +3871,8 @@ static void
get_last_end_pos(asdl_seq *s, int *end_lineno, int *end_col_offset)
{
int tot = asdl_seq_LEN(s);
// Suite should not be empty, but it is safe to just ignore it
// if it will ever occur.
if (!tot) {
return;
}
// There must be no empty suites.
assert(tot > 0);
stmt_ty last = asdl_seq_GET(s, tot - 1);
*end_lineno = last->end_lineno;
*end_col_offset = last->end_col_offset;