[New-bugs-announce] [issue26179] Python C-API "unused-parameter" warnings

Devyn Johnson report at bugs.python.org
Fri Jan 22 09:06:20 EST 2016


New submission from Devyn Johnson:

When compiling Python C-API extensions with "-Wextra", warnings like 

warning: unused parameter ‘self’ [-Wunused-parameter]

appear for code (like below). It seems like a minor issue for a warning to appear when "PyObject *self, PyObject *args" is required. Is there an underlying issue in the API?

static PyObject *mathfunc_ismersenneprime(PyObject *self, PyObject *args) {
    sllint num;
    ASSERT_LONGLONG_ARG(num);
    if (num < (sllint)0) ERR_POSITIVE_INT;
    returnbool(islonglongmersenneprime(num));
}

----------
components: Interpreter Core
messages: 258809
nosy: Devyn Johnson
priority: normal
severity: normal
status: open
title: Python C-API "unused-parameter" warnings
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26179>
_______________________________________


More information about the New-bugs-announce mailing list