From: Steve MacLean Date: Tue, 4 Feb 2020 23:25:48 +0000 (-0500) Subject: Fix unused variable warning (#31747) X-Git-Tag: submit/tizen/20210909.063632~10013 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c84774d4513bd62a3ebe065bc88f7f30e47f088;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Fix unused variable warning (#31747) --- diff --git a/src/coreclr/src/utilcode/regutil.cpp b/src/coreclr/src/utilcode/regutil.cpp index 4ae47cb..0e5c4b0 100644 --- a/src/coreclr/src/utilcode/regutil.cpp +++ b/src/coreclr/src/utilcode/regutil.cpp @@ -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) {