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

@@ -2898,9 +2898,14 @@ static int Vector_swizzle_set(VectorObject *self, PyObject *value, void *closure
/** \name Vector Type: Get/Set Item Definitions
* \{ */
#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 PyGetSetDef Vector_getseters[] = {
@@ -3314,8 +3319,12 @@ static PyGetSetDef Vector_getseters[] = {
{nullptr, nullptr, nullptr, nullptr, nullptr} /* Sentinel */
};
#if (defined(__GNUC__) && !defined(__clang__))
# pragma GCC diagnostic pop
#ifdef __GNUC__
# ifdef __clang__
# pragma clang diagnostic pop
# else
# pragma GCC diagnostic pop
# endif
#endif
/** \} */
@@ -3324,9 +3333,14 @@ static PyGetSetDef Vector_getseters[] = {
/** \name Vector Type: Method Definitions
* \{ */
#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 Vector_methods[] = {
@@ -3380,8 +3394,12 @@ static PyMethodDef Vector_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
/** \} */