bpo-33012: Fix invalid function cast warnings with gcc 8 for METH_NOARGS by siddhesh · Pull Request #6030 · python/cpython

serhiy-storchaka

siddhesh

METH_NOARGS functions need only a single argument but they are cast
into a PyCFunction, which takes two arguments.  This triggers an
invalid function cast warning in gcc8 (unreleased as of now) due to
the argument mismatch.  Fix this by adding a dummy unused argument.
METH_NOARGS functions need only a single argument but they are cast
into a PyCFunction, which takes two arguments.  This triggers an
invalid function cast warning in gcc8 (unreleased as of now) due to
the argument mismatch.  Fix this by adding a dummy unused argument.

serhiy-storchaka

METH_NOARGS functions need only a single argument but they are cast
into a PyCFunction, which takes two arguments.  This triggers an
invalid function cast warning in gcc8 (unreleased as of now) due to
the argument mismatch.  Fix this by adding a dummy unused argument
wherever it isn't present and mark it as unused to make it consistent
with other similar uses.
METH_NOARGS functions need only a single argument but they are cast
into a PyCFunction, which takes two arguments.  This triggers an
invalid function cast warning in gcc8 (unreleased as of now) due to
the argument mismatch.  Fix this by adding a dummy unused argument.
METH_NOARGS functions need only a single argument but they are cast
into a PyCFunction, which takes two arguments.  This triggers an
invalid function cast warning in gcc8 (unreleased as of now) due to
the argument mismatch.  Fix this by adding a dummy unused argument.

@siddhesh

serhiy-storchaka