desktop: fix type of the last argument of lok_preinit_2()

This went wrong in commit 5de22d1e55
(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 <vmiklos@collabora.com>
This commit is contained in:
Miklos Vajna
2022-05-26 08:25:04 +02:00
parent 645413a14a
commit 60a39b8dd8
+1 -1
View File
@@ -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);