From 16bf838ef479b8db371dbe97335e035e2e22f6ce Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 9 Jan 2020 10:40:02 +0100 Subject: -Werror,-Wwritable-strings (clang-cl) Change-Id: I67287498db35c60f224b095b00e6c058f53c10cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86471 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- setup_native/source/win32/customactions/reg_dlls/reg_dlls.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'setup_native/source') 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(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(L""), &nSz) + == ERROR_MORE_DATA) { ++nSz; auto buf = std::make_unique(nSz); -- cgit