dinput: Avoid signed-unsigned integer comparisons

Andrew Talbot andrew.talbot at talbotville.com
Mon Jan 14 15:44:49 CST 2013


Changelog:
    dinput:  Avoid signed-unsigned integer comparisons.

diff --git a/dlls/dinput/config.c b/dlls/dinput/config.c
index abf3fd5..708f406 100644
--- a/dlls/dinput/config.c
+++ b/dlls/dinput/config.c
@@ -331,7 +331,7 @@ static void assign_action(HWND dialog)
 
 static void copy_actions(LPDIACTIONFORMATW to, LPDIACTIONFORMATW from)
 {
-    int i;
+    DWORD i;
     for (i=0; i < from->dwNumActions; i++)
     {
         to->rgoAction[i].guidInstance = from->rgoAction[i].guidInstance;
diff --git a/dlls/dinput/joystick.c b/dlls/dinput/joystick.c
index d32acec..73ded55 100644
--- a/dlls/dinput/joystick.c
+++ b/dlls/dinput/joystick.c
@@ -482,7 +482,8 @@ HRESULT WINAPI JoystickWGenericImpl_BuildActionMap(LPDIRECTINPUTDEVICE8W iface,
                                                    DWORD dwFlags)
 {
     JoystickGenericImpl *This = impl_from_IDirectInputDevice8W(iface);
-    int i, j, has_actions = 0;
+    unsigned int i, j;
+    int has_actions = 0;
     DWORD object_types[] = { DIDFT_AXIS, DIDFT_BUTTON };
     DWORD type_map[] = { DIDFT_RELAXIS, DIDFT_PSHBUTTON };
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20130114/06ee57ac/attachment.html>


More information about the wine-patches mailing list