-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: Fix compile time warnings #13607
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
Conversation
can u run all tests on Windows and report (if u can) otherwise I will |
Sorry I can not setup Windows environments soonly 😢 |
Current coverage is 84.33%@@ master #13607 diff @@
==========================================
Files 138 138
Lines 51100 51100
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 43097 43097
Misses 8003 8003
Partials 0 0
|
@@ -460,7 +460,7 @@ parse_iso_8601_datetime(char *str, int len, | |||
} | |||
|
|||
/* Check the casting rule */ | |||
if (unit != -1 && !can_cast_datetime64_units(bestunit, unit, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any idea what this was for? e.g. what was the intent originally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess checking -1
or not is for https://github.com/pydata/pandas/blob/820e1105a44f6f9347a02ebed0a85b4b71d70363/pandas/src/datetime/np_datetime_strings.c#L316 .
Only this line assigns -1
for PANDAS_DATETIMEUNIT
a type variable.
ok @yui-knk this lgtm. and tests out on windows. (the warning only seems to appear on linux/osx), but that's ok! pls add a whatsnew entry in bug fix for 0.19.0, reference this PR. ping when green. |
3c7d15e
to
e9eee1d
Compare
This commit suppresses these warnings warning: comparison of constant -1 with expression\ of type 'PANDAS_DATETIMEUNIT' is always true\ [-Wtautological-constant-out-of-range-compare]
@jreback I added a whatsnew entry :) |
thanks @yui-knk |
No problem 😄 |
This commit suppresses these warnings warning: comparison of constant -1 with expression\ of type 'PANDAS_DATETIMEUNIT' is always true\ [-Wtautological-constant-out-of-range-compare] Author: yui-knk <[email protected]> Closes pandas-dev#13607 from yui-knk/fix_c_warning and squashes the following commits: e9eee1d [yui-knk] CLN: Fix compile time warnings
git diff upstream/master | flake8 --diff
This commit suppresses these warnings
warning: comparison of constant -1 with expression
of type 'PANDAS_DATETIMEUNIT' is always true
[-Wtautological-constant-out-of-range-compare]