Cleanup: suppress cast-function-type warnings for CLANG

Extend the existing GCC pragma's and add the warning suppression
for Cycles & Freestyle.
This commit is contained in:
Campbell Barton
2025-04-01 12:06:03 +11:00
parent ccbf8c0544
commit e3d6051181
80 changed files with 1432 additions and 327 deletions

View File

@@ -556,9 +556,14 @@ static int pygpu_buffer__mp_ass_subscript(BPyGPUBuffer *self, PyObject *item, Py
return -1;
}
#if (defined(__GNUC__) && !defined(__clang__))
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wcast-function-type"
#ifdef __GNUC__
# ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wcast-function-type"
# else
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wcast-function-type"
# endif
#endif
static PyMethodDef pygpu_buffer__tp_methods[] = {
@@ -569,8 +574,12 @@ static PyMethodDef pygpu_buffer__tp_methods[] = {
{nullptr, nullptr, 0, nullptr},
};
#if (defined(__GNUC__) && !defined(__clang__))
# pragma GCC diagnostic pop
#ifdef __GNUC__
# ifdef __clang__
# pragma clang diagnostic pop
# else
# pragma GCC diagnostic pop
# endif
#endif
static PyGetSetDef pygpu_buffer_getseters[] = {