Skip to content

MAINT: Initialize year to silence warning #35763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pandas/_libs/tslibs/parsing.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@ cdef inline object _parse_dateabbr_string(object date_string, datetime default,
object freq):
cdef:
object ret
int year, quarter = -1, month, mnum, date_len
# year initialized to prevent compiler warnings
int year = -1, quarter = -1, month, mnum, date_len

# special handling for possibilities eg, 2Q2005, 2Q05, 2005Q1, 05Q1
assert isinstance(date_string, str)
Expand Down