desktop/source/lib/init.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1e79738bb644a26a5526851c0b85427817793c38
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Wed May 25 15:01:59 2022 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Thu Nov 17 13:59:25 2022 +0100

    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.
    
    (cherry picked from commit 60a39b8dd89cffbb02bc275d888eee1fe53ef035)
    
    Change-Id: Ib80711a5ae7719a9058151f482aca50c43185348
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142827
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 7a18d110ef40..93552811ab69 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -7399,7 +7399,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);

Reply via email to