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

@@ -3367,9 +3367,14 @@ 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"
#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 Matrix_methods[] = {
@@ -3435,8 +3440,12 @@ static PyMethodDef Matrix_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
/** \} */