joy.cpl: Use variable of correct type to store LSTATUS value.

Sebastian Lackner sebastian at fds-team.de
Tue Sep 13 02:03:17 CDT 2016


Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
---

.../dlls/joy.cpl/main.c:251:12: warning: Assigning 'LSTATUS' (aka 'int') to 'HRESULT' (aka 'int') [wine-hresult-check]
        hr = RegEnumValueW(hkey, i, buf_name, &name_len, NULL, NULL, (BYTE*) buf_data, &data_len);
           ^

 dlls/joy.cpl/main.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/joy.cpl/main.c b/dlls/joy.cpl/main.c
index b5a55fa..fbf6135 100644
--- a/dlls/joy.cpl/main.c
+++ b/dlls/joy.cpl/main.c
@@ -234,7 +234,7 @@ static void initialize_disabled_joysticks_list(HWND hwnd)
     static const WCHAR disabled_str[] = {'d','i','s','a','b','l','e','d','\0'};
     HKEY hkey, appkey;
     DWORD values = 0;
-    HRESULT hr;
+    LSTATUS status;
     DWORD i;
 
     SendDlgItemMessageW(hwnd, IDC_DISABLEDLIST, LB_RESETCONTENT, 0, 0);
@@ -248,9 +248,9 @@ static void initialize_disabled_joysticks_list(HWND hwnd)
         DWORD name_len = MAX_PATH, data_len = MAX_PATH;
         WCHAR buf_name[MAX_PATH + 9], buf_data[MAX_PATH];
 
-        hr = RegEnumValueW(hkey, i, buf_name, &name_len, NULL, NULL, (BYTE*) buf_data, &data_len);
+        status = RegEnumValueW(hkey, i, buf_name, &name_len, NULL, NULL, (BYTE*) buf_data, &data_len);
 
-        if (SUCCEEDED(hr) && !lstrcmpW(disabled_str, buf_data))
+        if (status == ERROR_SUCCESS && !lstrcmpW(disabled_str, buf_data))
             SendDlgItemMessageW(hwnd, IDC_DISABLEDLIST, LB_ADDSTRING, 0, (LPARAM) buf_name);
     }
 
-- 
2.9.0



More information about the wine-patches mailing list