summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-03-07 18:22:12 +0100
committerDavid Tardon <dtardon@redhat.com>2012-03-12 08:53:19 +0100
commit7419e0e00cfc2589d1fe171c73b4de7c8c6d7065 (patch)
treeeafc6b9e4434749ea888130c04d1fec574b4b4dd
parent4876d7e28f92e125bb2028de003cf9b1774f6b42 (diff)
WaE: deprecated conversion from string constant to 'char*'
-rw-r--r--embedserv/source/inprocserv/dllentry.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/embedserv/source/inprocserv/dllentry.cxx b/embedserv/source/inprocserv/dllentry.cxx
index ba6374658715..7c4c88ca666c 100644
--- a/embedserv/source/inprocserv/dllentry.cxx
+++ b/embedserv/source/inprocserv/dllentry.cxx
@@ -95,7 +95,7 @@ namespace {
return 38;
}
- HRESULT WriteLibraryToRegistry( char* pLibrary, DWORD nLen )
+ HRESULT WriteLibraryToRegistry( const char* pLibrary, DWORD nLen )
{
HRESULT hRes = E_FAIL;
if ( pLibrary && nLen )
@@ -105,7 +105,9 @@ namespace {
hRes = S_OK;
for ( int nInd = 0; nInd < SUPPORTED_FACTORIES_NUM; nInd++ )
{
- char* pSubKey = "Software\\Classes\\CLSID\\.....................................\\InprocHandler32";
+ const char pSubKeyTemplate[] = "Software\\Classes\\CLSID\\.....................................\\InprocHandler32";
+ char pSubKey[SAL_N_ELEMENTS(pSubKeyTemplate)];
+ strncpy(pSubKey, pSubKeyTemplate, SAL_N_ELEMENTS(pSubKeyTemplate));
int nGuidLen = GetStringFromClassID( *guidList[nInd], &pSubKey[23], 38 );