From 000af551ed917f6c3cd7fde525050693ac2ad413 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 13 Nov 2015 09:54:23 +0100 Subject: -Werror,-Wwritable-strings Change-Id: I18d4d9153009ff132fe07b30ad55025e3875a180 --- .../source/win32/customactions/quickstarter/quickstarter.cxx | 6 +++--- setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx | 2 +- setup_native/source/win32/customactions/regactivex/regactivex.cxx | 2 +- setup_native/source/win32/customactions/sellang/sellang.cxx | 2 +- setup_native/source/win32/customactions/tools/checkversion.cxx | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'setup_native/source') diff --git a/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx b/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx index fc6aee504617..dccae732e3b2 100644 --- a/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx +++ b/setup_native/source/win32/customactions/quickstarter/quickstarter.cxx @@ -31,7 +31,7 @@ std::string GetOfficeInstallationPath(MSIHANDLE handle) { std::string progpath; DWORD sz = 0; - LPTSTR dummy = TEXT(""); + LPTSTR dummy = const_cast(TEXT("")); if (MsiGetProperty(handle, TEXT("INSTALLLOCATION"), dummy, &sz) == ERROR_MORE_DATA) { @@ -49,7 +49,7 @@ std::string GetOfficeProductName(MSIHANDLE handle) { std::string productname; DWORD sz = 0; - LPTSTR dummy = TEXT(""); + LPTSTR dummy = const_cast(TEXT("")); if (MsiGetProperty(handle, TEXT("ProductName"), dummy, &sz) == ERROR_MORE_DATA) { @@ -67,7 +67,7 @@ std::string GetQuickstarterLinkName(MSIHANDLE handle) { std::string quickstarterlinkname; DWORD sz = 0; - LPTSTR dummy = TEXT(""); + LPTSTR dummy = const_cast(TEXT("")); if (MsiGetProperty(handle, TEXT("Quickstarterlinkname"), dummy, &sz) == ERROR_MORE_DATA) { diff --git a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx index 539fdeb16be9..ebd8d27e08a4 100644 --- a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx +++ b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx @@ -134,7 +134,7 @@ static BOOL CheckExtensionInRegistry( LPCSTR lpSubKey ) bool GetMsiProp( MSIHANDLE handle, LPCSTR name, /*out*/std::string& value ) { DWORD sz = 0; - LPSTR dummy = ""; + LPSTR dummy = const_cast(""); if (MsiGetPropertyA(handle, name, dummy, &sz) == ERROR_MORE_DATA) { sz++; diff --git a/setup_native/source/win32/customactions/regactivex/regactivex.cxx b/setup_native/source/win32/customactions/regactivex/regactivex.cxx index 25b6f2c8fa86..627858d8dc8d 100644 --- a/setup_native/source/win32/customactions/regactivex/regactivex.cxx +++ b/setup_native/source/win32/customactions/regactivex/regactivex.cxx @@ -113,7 +113,7 @@ void UnregisterActiveXNative( const char* pActiveXPath, int nMode, BOOL InstallF BOOL GetMsiProp( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppValue ) { DWORD sz = 0; - if ( MsiGetProperty( hMSI, pPropName, L"", &sz ) == ERROR_MORE_DATA ) + if ( MsiGetProperty( hMSI, pPropName, const_cast(L""), &sz ) == ERROR_MORE_DATA ) { sz++; DWORD nbytes = sz * sizeof( wchar_t ); diff --git a/setup_native/source/win32/customactions/sellang/sellang.cxx b/setup_native/source/win32/customactions/sellang/sellang.cxx index 9c6ab5326f73..e72fe0969a3a 100644 --- a/setup_native/source/win32/customactions/sellang/sellang.cxx +++ b/setup_native/source/win32/customactions/sellang/sellang.cxx @@ -40,7 +40,7 @@ BOOL GetMsiProp( MSIHANDLE hMSI, const char* pPropName, char** ppValue ) { DWORD sz = 0; - if ( MsiGetProperty( hMSI, pPropName, "", &sz ) == ERROR_MORE_DATA ) { + if ( MsiGetProperty( hMSI, pPropName, const_cast(""), &sz ) == ERROR_MORE_DATA ) { sz++; DWORD nbytes = sz * sizeof( char ); char* buff = reinterpret_cast( malloc( nbytes ) ); diff --git a/setup_native/source/win32/customactions/tools/checkversion.cxx b/setup_native/source/win32/customactions/tools/checkversion.cxx index fb6f77d74bfa..49ae4550f3a5 100644 --- a/setup_native/source/win32/customactions/tools/checkversion.cxx +++ b/setup_native/source/win32/customactions/tools/checkversion.cxx @@ -39,7 +39,7 @@ BOOL GetMsiProp( MSIHANDLE hMSI, const wchar_t* pPropName, wchar_t** ppValue ) { DWORD sz = 0; - if ( MsiGetProperty( hMSI, pPropName, L"", &sz ) == ERROR_MORE_DATA ) + if ( MsiGetProperty( hMSI, pPropName, const_cast(L""), &sz ) == ERROR_MORE_DATA ) { sz++; DWORD nbytes = sz * sizeof( wchar_t ); -- cgit