Commit 5637c779 authored by Lei Zhang's avatar Lei Zhang Committed by Alexandre Julliard

shell32: Remove unused variable.

parent 4c656d88
...@@ -1164,7 +1164,7 @@ static HRESULT _SHGetUserShellFolderPath(HKEY rootKey, LPCWSTR userPrefix, ...@@ -1164,7 +1164,7 @@ static HRESULT _SHGetUserShellFolderPath(HKEY rootKey, LPCWSTR userPrefix,
HRESULT hr; HRESULT hr;
WCHAR shellFolderPath[MAX_PATH], userShellFolderPath[MAX_PATH]; WCHAR shellFolderPath[MAX_PATH], userShellFolderPath[MAX_PATH];
LPCWSTR pShellFolderPath, pUserShellFolderPath; LPCWSTR pShellFolderPath, pUserShellFolderPath;
DWORD dwDisp, dwType, dwPathLen = MAX_PATH; DWORD dwType, dwPathLen = MAX_PATH;
HKEY userShellFolderKey, shellFolderKey; HKEY userShellFolderKey, shellFolderKey;
TRACE("%p,%s,%s,%p\n",rootKey, debugstr_w(userPrefix), debugstr_w(value), TRACE("%p,%s,%s,%p\n",rootKey, debugstr_w(userPrefix), debugstr_w(value),
...@@ -1187,14 +1187,12 @@ static HRESULT _SHGetUserShellFolderPath(HKEY rootKey, LPCWSTR userPrefix, ...@@ -1187,14 +1187,12 @@ static HRESULT _SHGetUserShellFolderPath(HKEY rootKey, LPCWSTR userPrefix,
pShellFolderPath = szSHFolders; pShellFolderPath = szSHFolders;
} }
if (RegCreateKeyExW(rootKey, pShellFolderPath, 0, NULL, 0, KEY_ALL_ACCESS, if (RegCreateKeyW(rootKey, pShellFolderPath, &shellFolderKey))
NULL, &shellFolderKey, &dwDisp))
{ {
TRACE("Failed to create %s\n", debugstr_w(pShellFolderPath)); TRACE("Failed to create %s\n", debugstr_w(pShellFolderPath));
return E_FAIL; return E_FAIL;
} }
if (RegCreateKeyExW(rootKey, pUserShellFolderPath, 0, NULL, 0, if (RegCreateKeyW(rootKey, pUserShellFolderPath, &userShellFolderKey))
KEY_ALL_ACCESS, NULL, &userShellFolderKey, &dwDisp))
{ {
TRACE("Failed to create %s\n", TRACE("Failed to create %s\n",
debugstr_w(pUserShellFolderPath)); debugstr_w(pUserShellFolderPath));
...@@ -1329,10 +1327,8 @@ static HRESULT _SHGetCurrentVersionPath(DWORD dwFlags, BYTE folder, ...@@ -1329,10 +1327,8 @@ static HRESULT _SHGetCurrentVersionPath(DWORD dwFlags, BYTE folder,
else else
{ {
HKEY hKey; HKEY hKey;
DWORD dwDisp;
if (RegCreateKeyExW(HKEY_LOCAL_MACHINE, szCurrentVersion, 0, if (RegCreateKeyW(HKEY_LOCAL_MACHINE, szCurrentVersion, &hKey))
NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, &dwDisp))
hr = E_FAIL; hr = E_FAIL;
else else
{ {
...@@ -1783,20 +1779,18 @@ static HRESULT _SHRegisterFolders(HKEY hRootKey, HANDLE hToken, ...@@ -1783,20 +1779,18 @@ static HRESULT _SHRegisterFolders(HKEY hRootKey, HANDLE hToken,
WCHAR path[MAX_PATH]; WCHAR path[MAX_PATH];
HRESULT hr = S_OK; HRESULT hr = S_OK;
HKEY hUserKey = NULL, hKey = NULL; HKEY hUserKey = NULL, hKey = NULL;
DWORD dwDisp, dwType, dwPathLen; DWORD dwType, dwPathLen;
LONG ret; LONG ret;
TRACE("%p,%p,%s,%p,%u\n", hRootKey, hToken, TRACE("%p,%p,%s,%p,%u\n", hRootKey, hToken,
debugstr_w(szUserShellFolderPath), folders, foldersLen); debugstr_w(szUserShellFolderPath), folders, foldersLen);
ret = RegCreateKeyExW(hRootKey, szUserShellFolderPath, 0, NULL, 0, ret = RegCreateKeyW(hRootKey, szUserShellFolderPath, &hUserKey);
KEY_ALL_ACCESS, NULL, &hUserKey, &dwDisp);
if (ret) if (ret)
hr = HRESULT_FROM_WIN32(ret); hr = HRESULT_FROM_WIN32(ret);
else else
{ {
ret = RegCreateKeyExW(hRootKey, szShellFolderPath, 0, NULL, 0, ret = RegCreateKeyW(hRootKey, szShellFolderPath, &hKey);
KEY_ALL_ACCESS, NULL, &hKey, &dwDisp);
if (ret) if (ret)
hr = HRESULT_FROM_WIN32(ret); hr = HRESULT_FROM_WIN32(ret);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment