Andrew Talbot : joy.cpl: Avoid signed-unsigned integer comparisons.
Alexandre Julliard
julliard at winehq.org
Mon Mar 11 16:24:51 CDT 2013
Module: wine
Branch: master
Commit: 3e2c44af7dc0c4a55c14aa4b46923dc86cf67d4e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3e2c44af7dc0c4a55c14aa4b46923dc86cf67d4e
Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date: Sat Mar 9 21:48:51 2013 +0000
joy.cpl: Avoid signed-unsigned integer comparisons.
---
dlls/joy.cpl/main.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dlls/joy.cpl/main.c b/dlls/joy.cpl/main.c
index dec83ff..857cb69 100644
--- a/dlls/joy.cpl/main.c
+++ b/dlls/joy.cpl/main.c
@@ -233,7 +233,7 @@ static void initialize_disabled_joysticks_list(HWND hwnd)
HKEY hkey, appkey;
DWORD values = 0;
HRESULT hr;
- int i;
+ DWORD i;
SendDlgItemMessageW(hwnd, IDC_DISABLEDLIST, LB_RESETCONTENT, 0, 0);
@@ -394,6 +394,8 @@ static DWORD WINAPI input_thread(void *param)
while (!data->stop)
{
int i;
+ unsigned int j;
+
poll_input(&data->joysticks[data->chosen_joystick], &state);
dump_joy_state(&state, data->joysticks[data->chosen_joystick].num_buttons);
@@ -412,12 +414,12 @@ static DWORD WINAPI input_thread(void *param)
axes_pos[2][1] = state.lRz;
/* Set pov values */
- for (i = 0; i < sizeof(pov_val)/sizeof(pov_val[0]); i++)
+ for (j = 0; i < sizeof(pov_val)/sizeof(pov_val[0]); j++)
{
- if (state.rgdwPOV[0] == pov_val[i])
+ if (state.rgdwPOV[0] == pov_val[j])
{
- axes_pos[3][0] = pov_pos[i][0];
- axes_pos[3][1] = pov_pos[i][1];
+ axes_pos[3][0] = pov_pos[j][0];
+ axes_pos[3][1] = pov_pos[j][1];
}
}
More information about the wine-cvs
mailing list