Cleanup: ignore GCC cast-function-type warning for PyMethodDef's
PyMethodDef::ml_flags define the function signature making the warning meaningless.
This commit is contained in:
@@ -117,6 +117,11 @@ static PyObject *pygpu_platform_backend_type_get(PyObject * /*self*/)
|
||||
/** \name Module
|
||||
* \{ */
|
||||
|
||||
#if (defined(__GNUC__) && !defined(__clang__))
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wcast-function-type"
|
||||
#endif
|
||||
|
||||
static PyMethodDef pygpu_platform__tp_methods[] = {
|
||||
{"vendor_get",
|
||||
(PyCFunction)pygpu_platform_vendor_get,
|
||||
@@ -141,6 +146,10 @@ static PyMethodDef pygpu_platform__tp_methods[] = {
|
||||
{nullptr, nullptr, 0, nullptr},
|
||||
};
|
||||
|
||||
#if (defined(__GNUC__) && !defined(__clang__))
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
PyDoc_STRVAR(pygpu_platform__tp_doc, "This module provides access to GPU Platform definitions.");
|
||||
static PyModuleDef pygpu_platform_module_def = {
|
||||
/*m_base*/ PyModuleDef_HEAD_INIT,
|
||||
|
||||
Reference in New Issue
Block a user