diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-13 09:52:47 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-18 17:19:14 +0100 |
commit | 4c03c36f739bdfebed5d80bd9ec9cb5928007173 (patch) | |
tree | 503784edb50f1ab94f2ba60570cfb5d6720dda0c /setup_native | |
parent | e82ebf09d2de04a83d6bcb97ab606a0be2badf46 (diff) |
-Werror,-Wunused-internal-declaration
Change-Id: I4e9b7ee46a4438feff8508d443822c607633e7c1
Diffstat (limited to 'setup_native')
-rw-r--r-- | setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx index fcf8d92cf445..539fdeb16be9 100644 --- a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx +++ b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx @@ -131,52 +131,6 @@ static BOOL CheckExtensionInRegistry( LPCSTR lpSubKey ) return bRet; } -static LONG DeleteSubKeyTree( HKEY RootKey, LPCSTR lpKey ) -{ - HKEY hKey; - LONG rc = RegOpenKeyExA( RootKey, lpKey, 0, KEY_READ | DELETE, &hKey ); - - if (ERROR_SUCCESS == rc) - { - LPCSTR lpSubKey; - DWORD nMaxSubKeyLen; - - rc = RegQueryInfoKeyA( hKey, 0, 0, 0, 0, &nMaxSubKeyLen, 0, 0, 0, 0, 0, 0 ); - nMaxSubKeyLen++; // space for trailing '\0' - lpSubKey = reinterpret_cast<CHAR*>( _alloca( nMaxSubKeyLen*sizeof(CHAR) ) ); - - while (ERROR_SUCCESS == rc) - { - DWORD nLen = nMaxSubKeyLen; - rc = RegEnumKeyExA( hKey, 0, (LPSTR)lpSubKey, &nLen, 0, 0, 0, 0); // always index zero - - if ( ERROR_NO_MORE_ITEMS == rc ) - { - rc = RegDeleteKeyA( RootKey, lpKey ); - if ( rc == ERROR_SUCCESS ) - OutputDebugStringFormat( "deleted key [%s] from registry.\n", lpKey ); - else - OutputDebugStringFormat( "RegDeleteKeyA %s returned %ld.\n", lpKey, rc ); - break; - } - else if ( rc == ERROR_SUCCESS ) - { - rc = DeleteSubKeyTree( hKey, lpSubKey ); - if ( ERROR_SUCCESS != rc ) - OutputDebugStringFormat( "RegDeleteKeyA %s returned %ld.\n", lpSubKey, rc ); - } - - } - RegCloseKey(hKey); - } - else - { - OutputDebugStringFormat( "RegOpenKeyExA %s returned %ld.\n", lpKey, rc ); - } - - return rc; -} - bool GetMsiProp( MSIHANDLE handle, LPCSTR name, /*out*/std::string& value ) { DWORD sz = 0; |