Skip to content

Explicitly define cmp_pandas_datetimestruct #17750

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 3 commits into from
Oct 3, 2017

Conversation

jbrockmendel
Copy link
Member

Fixes build warning

pandas/_libs/tslib.c:78967:17: warning: implicit declaration of function 'cmp_pandas_datetimestruct' is invalid in C99 [-Wimplicit-function-declaration]

@jreback
Copy link
Contributor

jreback commented Oct 2, 2017

lgtm. ping on green.

@jreback jreback added the Build Library building on various platforms label Oct 2, 2017
@jreback jreback added this to the 0.21.0 milestone Oct 2, 2017
@codecov
Copy link

codecov bot commented Oct 3, 2017

Codecov Report

Merging #17750 into master will decrease coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17750      +/-   ##
==========================================
- Coverage   91.25%   91.21%   -0.05%     
==========================================
  Files         163      163              
  Lines       49856    49856              
==========================================
- Hits        45496    45474      -22     
- Misses       4360     4382      +22
Flag Coverage Δ
#multiple 89.01% <ø> (-0.03%) ⬇️
#single 40.25% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/plotting/_converter.py 63.38% <0%> (-1.82%) ⬇️
pandas/core/frame.py 97.73% <0%> (-0.1%) ⬇️
pandas/core/indexes/datetimes.py 95.48% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 97fea48...0b9fff3. Read the comment docs.

@codecov
Copy link

codecov bot commented Oct 3, 2017

Codecov Report

Merging #17750 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17750      +/-   ##
==========================================
- Coverage   91.25%   91.24%   -0.02%     
==========================================
  Files         163      163              
  Lines       49856    49869      +13     
==========================================
+ Hits        45496    45502       +6     
- Misses       4360     4367       +7
Flag Coverage Δ
#multiple 89.04% <ø> (ø) ⬆️
#single 40.24% <ø> (-0.07%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.73% <0%> (-0.1%) ⬇️
pandas/plotting/_style.py 74.28% <0%> (ø) ⬆️
pandas/core/internals.py 94.38% <0%> (ø) ⬆️
pandas/core/indexing.py 93.97% <0%> (+0.03%) ⬆️
pandas/io/formats/excel.py 96.69% <0%> (+0.04%) ⬆️
pandas/core/indexes/base.py 96.46% <0%> (+0.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 97fea48...991dbfe. Read the comment docs.

@jreback
Copy link
Contributor

jreback commented Oct 3, 2017

this is causing some more warnings have a look at the travis logs

@jbrockmendel
Copy link
Member Author

Are you referring to

In file included from pandas/_libs/period.c:250:0:
pandas/_libs/src/datetime/np_datetime.h:106:5: note: expected ‘struct pandas_datetimestruct *’ but argument is of type ‘const struct pandas_datetimestruct *’
 int cmp_pandas_datetimestruct(pandas_datetimestruct *a,
     ^
pandas/_libs/period.c:20547:3: warning: passing argument 2 of ‘cmp_pandas_datetimestruct’ discards ‘const’ qualifier from pointer target type [enabled by default]

? AFAICT there's not much to be done about that unless we want to un-declare the const in np_datetime.c.

@jreback
Copy link
Contributor

jreback commented Oct 3, 2017

so how does this PR help then?

@jreback jreback removed this from the 0.21.0 milestone Oct 3, 2017
@jreback
Copy link
Contributor

jreback commented Oct 3, 2017

the warning currently s

pandas/_libs/tslib.c:81135:3: warning: implicit declaration of function ‘cmp_pandas_datetimestruct’ [-Wimplicit-function-declaration]
   __pyx_t_2 = ((cmp_pandas_datetimestruct(__pyx_v_dts, (&_NS_MIN_DTS)) == -1L) != 0);
   ^
pandas/_libs/tslib.c: In function ‘__pyx_pymod_exec_tslib’:

@jreback
Copy link
Contributor

jreback commented Oct 3, 2017

you need to declare const * the structure args in .h and change in .c

@jreback jreback added this to the 0.21.0 milestone Oct 3, 2017
@jreback jreback merged commit 69024a0 into pandas-dev:master Oct 3, 2017
@jreback
Copy link
Contributor

jreback commented Oct 3, 2017

thanks!

ghost pushed a commit to reef-technologies/pandas that referenced this pull request Oct 16, 2017
@jbrockmendel jbrockmendel deleted the implicit_declaration branch October 30, 2017 16:25
alanbato pushed a commit to alanbato/pandas that referenced this pull request Nov 10, 2017
No-Stream pushed a commit to No-Stream/pandas that referenced this pull request Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants