Fix unused variable warning (#31747)
authorSteve MacLean <Steve.MacLean@microsoft.com>
Tue, 4 Feb 2020 23:25:48 +0000 (18:25 -0500)
committerGitHub <noreply@github.com>
Tue, 4 Feb 2020 23:25:48 +0000 (18:25 -0500)
src/coreclr/src/utilcode/regutil.cpp

index 4ae47cb..0e5c4b0 100644 (file)
@@ -201,8 +201,6 @@ HRESULT REGUTIL::GetConfigInteger(LPCWSTR name, ULONGLONG defValue, __out ULONGL
     ULONGLONG rtn;
     ULONGLONG ret = 0;
     DWORD type = 0;
-    HKEY userKey;
-    HKEY machineKey;
     DWORD size = 4;
 
     FAULT_NOT_FATAL(); // We don't report OOM errors here, we return a default value.
@@ -250,7 +248,7 @@ HRESULT REGUTIL::GetConfigInteger(LPCWSTR name, ULONGLONG defValue, __out ULONGL
         {
             LONG retVal = ERROR_SUCCESS;
             BOOL bCloseHandle = FALSE;
-            userKey = s_hUserFrameworkKey;
+            HKEY userKey = s_hUserFrameworkKey;
 
             if (userKey == INVALID_HANDLE_VALUE)
             {
@@ -281,7 +279,7 @@ HRESULT REGUTIL::GetConfigInteger(LPCWSTR name, ULONGLONG defValue, __out ULONGL
         {
             LONG retVal = ERROR_SUCCESS;
             BOOL bCloseHandle = FALSE;
-            machineKey = s_hMachineFrameworkKey;
+            HKEY machineKey = s_hMachineFrameworkKey;
 
             if (machineKey == INVALID_HANDLE_VALUE)
             {