diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-03-24 18:16:10 +0100 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-03-24 23:14:32 +0100 |
commit | 1344e6261a1d856c71eca1e0cc29215a586bf335 (patch) | |
tree | e0a703916f596e78c1c9c59ee656ec0be313ed39 /connectivity | |
parent | 0c29c417ef3f0b749042e5a461abae9c36cf655b (diff) |
Avoid -Werror,-Wcast-function-type-mismatch
Change-Id: I0bd094b2f08f60df33b32cad7ae389141b41a209
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165229
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/evoab2/EApi.h | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/evoab2/NResultSet.cxx | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/connectivity/source/drivers/evoab2/EApi.h b/connectivity/source/drivers/evoab2/EApi.h index 9a2138eb2a26..a33bf9721de6 100644 --- a/connectivity/source/drivers/evoab2/EApi.h +++ b/connectivity/source/drivers/evoab2/EApi.h @@ -157,4 +157,6 @@ bool isSourceBackend(ESource *pSource, const char *backendname); G_END_DECLS +inline void object_unref(gpointer data, gpointer) { g_object_unref(data); } + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx index 96a0904efc0b..2f12a6f37bb1 100644 --- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx +++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx @@ -1139,7 +1139,7 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables( aRows.push_back(aRow); } - g_list_foreach (pSources, reinterpret_cast<GFunc>(g_object_unref), nullptr); + g_list_foreach (pSources, object_unref, nullptr); g_list_free (pSources); pResult->setRows(std::move(aRows)); diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx index 043be2553f86..78dbbbc53b2f 100644 --- a/connectivity/source/drivers/evoab2/NResultSet.cxx +++ b/connectivity/source/drivers/evoab2/NResultSet.cxx @@ -402,7 +402,7 @@ public: break; } } - g_list_foreach (pSources, reinterpret_cast<GFunc>(g_object_unref), nullptr); + g_list_foreach (pSources, object_unref, nullptr); g_list_free (pSources); if (!id) return nullptr; |