Skip to content

bpo-30074: Fix compile warnings of _PySlice_Unpack and convert missed #1154

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

Conversation

serhiy-storchaka
Copy link
Member

PySlice_GetIndicesEx in _ctypes.c.

@serhiy-storchaka serhiy-storchaka added the type-bug An unexpected behavior, bug, or error label Apr 15, 2017
Copy link
Member

@zhangyangyu zhangyangyu left a comment

Choose a reason for hiding this comment

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

There are still 2:

Objects/sliceobject.c: In function ‘slice_indices’:
Objects/sliceobject.c:297:25: warning: passing argument 1 of ‘_PySlice_Unpack’ from incompatible pointer type [-Wincompatible-pointer-types]
if (_PySlice_Unpack(self, &start, &stop, &step) < 0) {
^
Objects/sliceobject.c:134:1: note: expected ‘PyObject * {aka struct _object *}’ but argument is of type ‘PySliceObject * {aka struct *}’
_PySlice_Unpack(PyObject *_r,
^
Objects/sliceobject.c:289:41: warning: variable ‘slicelength’ set but not used [-Wunused-but-set-variable]
Py_ssize_t ilen, start, stop, step, slicelength;
^

Copy link
Member

@zhangyangyu zhangyangyu left a comment

Choose a reason for hiding this comment

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

The warnings are gone. :-)

@serhiy-storchaka serhiy-storchaka merged commit 5e79321 into python:2.7 Apr 15, 2017
@serhiy-storchaka serhiy-storchaka deleted the _PySlice_Unpack-compile-warnings branch April 15, 2017 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants