Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

yui-knk
Copy link
Contributor

@yui-knk yui-knk commented Jul 10, 2016

  • passes 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]

@jreback
Copy link
Contributor

jreback commented Jul 10, 2016

can u run all tests on Windows and report (if u can) otherwise I will

@yui-knk
Copy link
Contributor Author

yui-knk commented Jul 10, 2016

Sorry I can not setup Windows environments soonly 😢

@codecov-io
Copy link

codecov-io commented Jul 10, 2016

Current coverage is 84.33%

Merging #13607 into master will not change coverage

@@             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          

Powered by Codecov. Last updated by 2f7fdd0...e9eee1d

@jreback jreback changed the title CLN: Fix compile tiem warnings CLN: Fix compile time warnings Jul 10, 2016
@jreback jreback added the Clean label Jul 10, 2016
@jreback jreback added this to the 0.19.0 milestone Jul 10, 2016
@@ -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,
Copy link
Contributor

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

Copy link
Contributor Author

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.

@jreback
Copy link
Contributor

jreback commented Jul 10, 2016

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.

@yui-knk yui-knk force-pushed the fix_c_warning branch 2 times, most recently from 3c7d15e to e9eee1d Compare July 11, 2016 15:30
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]
@yui-knk
Copy link
Contributor Author

yui-knk commented Jul 11, 2016

@jreback I added a whatsnew entry :)

@jreback jreback closed this in 27d2915 Jul 13, 2016
@jreback
Copy link
Contributor

jreback commented Jul 13, 2016

thanks @yui-knk

@yui-knk
Copy link
Contributor Author

yui-knk commented Jul 13, 2016

No problem 😄

@yui-knk yui-knk deleted the fix_c_warning branch July 13, 2016 02:20
nateGeorge pushed a commit to nateGeorge/pandas that referenced this pull request Aug 15, 2016
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants