diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-13 09:54:23 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-18 17:19:15 +0100 |
commit | 000af551ed917f6c3cd7fde525050693ac2ad413 (patch) | |
tree | 5397acb019878cb7ea11959075127118203d406e /setup_native/source | |
parent | 18e972c2d993994ea2b80f13cf2013397af1c67f (diff) |
-Werror,-Wwritable-strings
Change-Id: I18d4d9153009ff132fe07b30ad55025e3875a180
Diffstat (limited to 'setup_native/source')
5 files changed, 7 insertions, 7 deletions
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<LPTSTR>(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<LPTSTR>(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<LPTSTR>(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<LPSTR>(""); 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<wchar_t *>(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<char *>(""), &sz ) == ERROR_MORE_DATA ) { sz++; DWORD nbytes = sz * sizeof( char ); char* buff = reinterpret_cast<char*>( 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<wchar_t *>(L""), &sz ) == ERROR_MORE_DATA ) { sz++; DWORD nbytes = sz * sizeof( wchar_t ); |