[issue36197] Compilation Warning for memoryview.tobytes and _collections._tuplegetter.__reduce__

2019-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset adfffc7343ce7ebc88ec734a803d3247ba8927fb by Serhiy Storchaka in branch 'master': Fix the C function signature for _collections._tuplegetter.__reduce__. (GH-12180) https://github.com/python/cpython/commit/adfffc7343ce7ebc88ec734a803d3247ba8927

[issue36197] Compilation Warning for memoryview.tobytes and _collections._tuplegetter.__reduce__

2019-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is only for methods with METH_NOARGS. The code that calls such method, calls it with two arguments, passing NULL as the second argument. So the signature of the C function should have two parameters. Functions for methods with METH_KEYWORDS or METH_FA

[issue36197] Compilation Warning for memoryview.tobytes and _collections._tuplegetter.__reduce__

2019-03-05 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Hi @serhiy, Thank you for your PR, I prefer your patch, just because you have just added the PyObject *Py_UNUSED(ignored) to the tuplegetter_reduce function. And in this case, you don't need to cast to (void(*)(void)). I will use this tip for the next time.

[issue36197] Compilation Warning for memoryview.tobytes and _collections._tuplegetter.__reduce__

2019-03-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is not correct fix for tuplegetter_reduce. tuplegetter_reduce should have two parameters, just the second is unused. -- nosy: +serhiy.storchaka ___ Python tracker __

[issue36197] Compilation Warning for memoryview.tobytes and _collections._tuplegetter.__reduce__

2019-03-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +12176 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue36197] Compilation Warning for memoryview.tobytes and _collections._tuplegetter.__reduce__

2019-03-05 Thread STINNER Victor
STINNER Victor added the comment: I prefer to reuse bpo-33012. -- nosy: +vstinner resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Invalid function cast warnings with gcc 8 for METH_NOARGS ___ Python t

[issue36197] Compilation Warning for memoryview.tobytes and _collections._tuplegetter.__reduce__

2019-03-05 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: Fix an other warning in the same PR _collections._tuplegetter.__reduce__ -- title: Compilation Warning for memoryview.tobytes -> Compilation Warning for memoryview.tobytes and _collections._tuplegetter.__reduce__

[issue36197] Compilation Warning for memoryview.tobytes

2019-03-05 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- keywords: +easy (C) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue36197] Compilation Warning for memoryview.tobytes

2019-03-05 Thread Stéphane Wirtel
Change by Stéphane Wirtel : -- keywords: +patch pull_requests: +12174 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue36197] Compilation Warning for memoryview.tobytes

2019-03-05 Thread Stéphane Wirtel
New submission from Stéphane Wirtel : gcc -pthread -c -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -g -Og -Wall-std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -I./Include/internal -I. -I.