[Libreoffice-commits] core.git: setup_native/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu Jan 9 10:44:42 UTC 2020


 setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 16bf838ef479b8db371dbe97335e035e2e22f6ce
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Jan 9 10:40:02 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Jan 9 11:44:08 2020 +0100

    -Werror,-Wwritable-strings (clang-cl)
    
    Change-Id: I67287498db35c60f224b095b00e6c058f53c10cf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86471
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx b/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx
index 250a81bd0fa0..74a524e4dae6 100644
--- a/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx
+++ b/setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx
@@ -128,7 +128,7 @@ std::wstring MsiGetPropertyW(MSIHANDLE hInst, LPCWSTR szName)
 {
     std::wstring sResult;
     DWORD nSz = 0;
-    UINT nRet = ::MsiGetPropertyW(hInst, szName, L"", &nSz);
+    UINT nRet = ::MsiGetPropertyW(hInst, szName, const_cast<wchar_t*>(L""), &nSz);
     if (nRet == ERROR_MORE_DATA)
     {
         ++nSz;
@@ -284,7 +284,8 @@ extern "C" __declspec(dllexport) UINT __stdcall PrepRegUnregDLLs(MSIHANDLE hInst
                 throw std::exception("MsiCreateRecord failed!");
             MsiRecordSetStringW(hRec, 0, sVal.c_str());
             DWORD nSz = 0;
-            if (MsiFormatRecordW(hInstall, hRec, L"", &nSz) == ERROR_MORE_DATA)
+            if (MsiFormatRecordW(hInstall, hRec, const_cast<wchar_t*>(L""), &nSz)
+                == ERROR_MORE_DATA)
             {
                 ++nSz;
                 auto buf = std::make_unique<wchar_t[]>(nSz);


More information about the Libreoffice-commits mailing list