Skip to content

MAINT: remove duplicated if statements between DescrConverters - #15266

Merged
seberg merged 1 commit into
numpy:masterfrom
eric-wieser:deduplicate-if-align
Jan 7, 2020
Merged

seberg merged 1 commit into
numpy:masterfrom
eric-wieser:deduplicate-if-align

Conversation

@eric-wieser

Copy link
Copy Markdown
Member

Split from #15265, since that failed in a peculiar way in only non-windows CI, and submitting this commit separately will allow me to bisect.

@eric-wieser

eric-wieser commented Jan 6, 2020 •

Copy link
Copy Markdown
Member Author

The CI failure here baffles me - they only seem to happen on azure, and linux: https://dev.azure.com/numpy/numpy/_build/results?buildId=7317&view=results

@eric-wieser
eric-wieser force-pushed the deduplicate-if-align branch from 7649f27 to 8668016 Compare January 6, 2020 22:51
Comment thread numpy/core/src/multiarray/descriptor.c Outdated
@eric-wieser
eric-wieser force-pushed the deduplicate-if-align branch from 8668016 to e116fbb Compare January 6, 2020 23:34
@eric-wieser
eric-wieser force-pushed the deduplicate-if-align branch from e116fbb to d11601b Compare January 7, 2020 00:19
for (i = 0; i < n; i++) {
PyObject *tup, *descr, *ind, *title, *name, *off;
int len, ret, _align = 1;
int len, _align = 1;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mystery solved, this ret was being used uninitialized further down the file, in places where it made no sense to check it anyway.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odd that the compiler warning tests did not find that :(.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, there was a codepath that set it, so the error was likely something like "maybe uninitialized", rather than "is uninitialized".

@seberg

seberg commented Jan 7, 2020

Copy link
Copy Markdown
Member

Ok, the shippable test does not matter, and it looks good to me now. Thanks.

@seberg
seberg merged commit 93f2470 into numpy:master Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants