Cleanup: ignore GCC cast-function-type warning for PyMethodDef's
While these warnings point to real errors in the code, PyMethodDef are an exception where functions with different numbers of arguments are all cast to the same function type.
This commit is contained in:
@@ -3271,6 +3271,11 @@ static PyGetSetDef Matrix_getseters[] = {
|
||||
/** \name Matrix Type: Method Definitions
|
||||
* \{ */
|
||||
|
||||
#if (defined(__GNUC__) && !defined(__clang__))
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wcast-function-type"
|
||||
#endif
|
||||
|
||||
static PyMethodDef Matrix_methods[] = {
|
||||
/* Derived values. */
|
||||
{"determinant", (PyCFunction)Matrix_determinant, METH_NOARGS, Matrix_determinant_doc},
|
||||
@@ -3334,6 +3339,10 @@ static PyMethodDef Matrix_methods[] = {
|
||||
{nullptr, nullptr, 0, nullptr},
|
||||
};
|
||||
|
||||
#if (defined(__GNUC__) && !defined(__clang__))
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user