desktop/source/lib/init.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 60a39b8dd89cffbb02bc275d888eee1fe53ef035 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Wed May 25 15:01:59 2022 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Thu May 26 08:25:04 2022 +0200 desktop: fix type of the last argument of lok_preinit_2() This went wrong in commit 5de22d1e559cd0f1f5fa4e247f0ce153710fbeab (Handle "addfont" from Collabora Online, 2022-03-09), running e.g. online.git unit-tiff-load with sanitizers complains: kit/Kit.cpp:2977:9: runtime error: call to function (unknown) through pointer to incorrect function type 'int (*)(const char *, const char *, _LibreOfficeKit **)' I.e. the type in lok_preinit_2() is LibLibreOffice_Impl**, but the type in LokHookPreInit2 is LibreOfficeKit**. Since this is just a pointer, there is no harm in adapting lok_preinit_2() to match. Change-Id: Ib80711a5ae7719a9058151f482aca50c43185348 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134941 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index fbba1847078a..e8bb8b44f6bf 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -6842,7 +6842,7 @@ int lok_preinit(const char* install_path, const char* user_profile_url) } SAL_JNI_EXPORT -int lok_preinit_2(const char* install_path, const char* user_profile_url, LibLibreOffice_Impl** kit) +int lok_preinit_2(const char* install_path, const char* user_profile_url, LibreOfficeKit** kit) { lok_preinit_2_called = true; int result = lo_initialize(nullptr, install_path, user_profile_url);