pyuno/source/module/pyuno.cxx | 11 +++++++++++ pyuno/source/module/pyuno_module.cxx | 11 +++++++++++ pyuno/source/module/pyuno_struct.cxx | 11 +++++++++++ 3 files changed, 33 insertions(+)
New commits: commit dae7304df68493afcf6e9c9e490d65ea20d8211f Author: Stephan Bergmann <[email protected]> AuthorDate: Sun Mar 24 18:16:59 2024 +0100 Commit: Stephan Bergmann <[email protected]> CommitDate: Sun Mar 24 23:13:48 2024 +0100 Silence Clang 19 trunk -Werror,-Wcast-function-type-mismatch Change-Id: Icd0af828e47c770ca8964656188d0d722a7f1ddc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165250 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx index f21cbb63d2f4..52e8b003fb18 100644 --- a/pyuno/source/module/pyuno.cxx +++ b/pyuno/source/module/pyuno.cxx @@ -1531,7 +1531,18 @@ static PyObject* PyUNO_cmp( PyObject *self, PyObject *that, int op ) static PyMethodDef PyUNOMethods[] = { +#if defined __clang__ +#if __has_warning("-Wcast-function-type-mismatch") +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcast-function-type-mismatch" +#endif +#endif {"__dir__", reinterpret_cast<PyCFunction>(PyUNO_dir), METH_NOARGS, nullptr}, +#if defined __clang__ +#if __has_warning("-Wcast-function-type-mismatch") +#pragma clang diagnostic pop +#endif +#endif {nullptr, nullptr, 0, nullptr} }; diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index 793aac834b1b..fc0e9939506e 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -849,7 +849,18 @@ struct PyMethodDef PyUNOModule_methods [] = {"private_initTestEnvironment", initTestEnvironment, METH_VARARGS, nullptr}, {"private_deinitTestEnvironment", deinitTestEnvironment, METH_VARARGS, nullptr}, {"getComponentContext", getComponentContext, METH_VARARGS, nullptr}, +#if defined __clang__ +#pragma clang diagnostic push +#if __has_warning("-Wcast-function-type-mismatch") +#pragma clang diagnostic ignored "-Wcast-function-type-mismatch" +#endif +#endif {"_createUnoStructHelper", reinterpret_cast<PyCFunction>(createUnoStructHelper), METH_VARARGS | METH_KEYWORDS, nullptr}, +#if defined __clang__ +#if __has_warning("-Wcast-function-type-mismatch") +#pragma clang diagnostic pop +#endif +#endif {"getTypeByName", getTypeByName, METH_VARARGS, nullptr}, {"getConstantByName", getConstantByName, METH_VARARGS, nullptr}, {"getClass", getClass, METH_VARARGS, nullptr}, diff --git a/pyuno/source/module/pyuno_struct.cxx b/pyuno/source/module/pyuno_struct.cxx index 364f2776011a..6f4dd47a4b35 100644 --- a/pyuno/source/module/pyuno_struct.cxx +++ b/pyuno/source/module/pyuno_struct.cxx @@ -283,7 +283,18 @@ static PyObject* PyUNOStruct_cmp( PyObject *self, PyObject *that, int op ) static PyMethodDef PyUNOStructMethods[] = { +#if defined __clang__ +#if __has_warning("-Wcast-function-type-mismatch") +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcast-function-type-mismatch" +#endif +#endif {"__dir__", reinterpret_cast<PyCFunction>(PyUNOStruct_dir), METH_NOARGS, nullptr}, +#if defined __clang__ +#if __has_warning("-Wcast-function-type-mismatch") +#pragma clang diagnostic pop +#endif +#endif {nullptr, nullptr, 0, nullptr} };
