Commit dbb3e147 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

Fix signed/unsigned comparison warnings.

parent 62851fdb
......@@ -223,7 +223,8 @@ static BOOL WINAPI dscenum_callback(LPGUID lpGuid, LPCSTR lpcstrDescription,
DSCBUFFERDESC bufdesc;
WAVEFORMATEX wfx;
DSCCAPS dsccaps;
int f, ref;
DWORD f;
int ref;
/* Private dsound.dll: Error: Invalid interface buffer */
trace("Testing %s - %s\n",lpcstrDescription,lpcstrModule);
......
......@@ -595,7 +595,8 @@ static HRESULT test_secondary(LPGUID lpGuid, int play,
if (rc==DS_OK && secondary!=NULL) {
if (!has_3d)
{
DWORD refvol,refpan,vol,pan;
DWORD refpan,pan;
LONG refvol,vol;
/* Check the initial secondary buffer's volume and pan */
rc=IDirectSoundBuffer_GetVolume(secondary,&vol);
......
......@@ -537,7 +537,7 @@ static HRESULT test_secondary8(LPGUID lpGuid, int play,
if (rc==DS_OK && secondary!=NULL) {
if (!has_3d)
{
DWORD refvol,refpan,vol,pan;
LONG refvol,refpan,vol,pan;
/* Check the initial secondary buffer's volume and pan */
rc=IDirectSoundBuffer_GetVolume(secondary,&vol);
......
......@@ -591,7 +591,8 @@ static HRESULT test_secondary(LPGUID lpGuid)
DSBUFFERDESC bufdesc;
DSCAPS dscaps;
WAVEFORMATEX wfx;
int f,ref;
DWORD f;
int ref;
/* Create the DirectSound object */
rc=DirectSoundCreate(lpGuid,&dso,NULL);
......
......@@ -614,7 +614,8 @@ static HRESULT test_secondary8(LPGUID lpGuid)
DSBUFFERDESC bufdesc;
DSCAPS dscaps;
WAVEFORMATEX wfx;
int f,ref;
DWORD f;
int ref;
/* Create the DirectSound object */
rc=DirectSoundCreate8(lpGuid,&dso,NULL);
......
......@@ -211,7 +211,7 @@ static void test_url_canonicalize(const char *szUrl, DWORD dwFlags, HRESULT dwEx
static void test_UrlEscape(void)
{
int i;
unsigned int i;
for(i=0; i<sizeof(TEST_ESCAPE)/sizeof(TEST_ESCAPE[0]); i++) {
test_url_escape(TEST_ESCAPE[i].url, TEST_ESCAPE[i].flags,
TEST_ESCAPE[i].expectret, TEST_ESCAPE[i].expecturl);
......@@ -220,7 +220,7 @@ static void test_UrlEscape(void)
static void test_UrlCanonicalize(void)
{
int i;
unsigned int i;
for(i=0; i<sizeof(TEST_CANONICALIZE)/sizeof(TEST_CANONICALIZE[0]); i++) {
test_url_canonicalize(TEST_CANONICALIZE[i].url, TEST_CANONICALIZE[i].flags,
TEST_CANONICALIZE[i].expectret, TEST_CANONICALIZE[i].expecturl);
......@@ -286,7 +286,7 @@ static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFla
static void test_UrlCombine(void)
{
int i;
unsigned int i;
for(i=0; i<sizeof(TEST_COMBINE)/sizeof(TEST_COMBINE[0]); i++) {
test_url_combine(TEST_COMBINE[i].url1, TEST_COMBINE[i].url2, TEST_COMBINE[i].flags,
TEST_COMBINE[i].expectret, TEST_COMBINE[i].expecturl);
......
......@@ -377,7 +377,7 @@ static void test_instances(void)
cls.style = 3;
ok( RegisterClassA( &cls ), "Failed to register local class for deadbeef\n" );
hwnd2 = CreateWindowExA( 0, name, "test_window", 0, 0, 0, 0, 0, 0, 0, NULL, 0 );
ok( GetClassLong( hwnd2, GCL_HMODULE ) == 0xdeadbeef,
ok( (HINSTANCE)GetClassLong( hwnd2, GCL_HMODULE ) == (HINSTANCE)0xdeadbeef,
"Didn't get deadbeef class for null instance\n" );
DestroyWindow( hwnd2 );
ok( UnregisterClassA( name, (HINSTANCE)0xdeadbeef ), "Unregister failed for deadbeef\n" );
......
......@@ -40,7 +40,7 @@
#define MAXHWNDS 1024
static HWND hwnd [MAXHWNDS];
static int numwnds=1; /* 0 is reserved for null */
static unsigned int numwnds=1; /* 0 is reserved for null */
/* Global handles */
static HINSTANCE g_hinst; /* This application's HINSTANCE */
......@@ -50,7 +50,7 @@ static HWND g_hwndTestDlg, g_hwndTestDlgBut1, g_hwndTestDlgBut2, g_hwndTestDlgEd
static int g_terminated;
typedef struct {
int id;
unsigned int id;
int parent;
DWORD style;
DWORD exstyle;
......@@ -248,7 +248,7 @@ typedef struct
static int id (HWND h)
{
int i;
unsigned int i;
for (i = 0; i < numwnds; i++)
if (hwnd[i] == h)
return i;
......
......@@ -35,7 +35,7 @@ static void test_LoadStringA (void)
struct string_test tests[] = {{sizeof buf, sizeof str - 1},
{sizeof str, sizeof str - 1},
{sizeof str - 1, sizeof str - 2}};
int i;
unsigned int i;
assert (sizeof str < sizeof buf);
for (i = 0; i < sizeof tests / sizeof tests[0]; i++) {
......
......@@ -455,7 +455,7 @@ static void test_SPI_SETKEYBOARDSPEED( void ) /* 10 */
BOOL rc;
UINT old_speed;
const UINT vals[]={0,20,31};
int i;
unsigned int i;
trace("testing SPI_{GET,SET}KEYBOARDSPEED\n");
rc=SystemParametersInfoA( SPI_GETKEYBOARDSPEED, 0, &old_speed, 0 );
......@@ -530,7 +530,7 @@ static void test_SPI_SETSCREENSAVETIMEOUT( void ) /* 14 */
BOOL rc;
UINT old_timeout;
const UINT vals[]={0,32767};
int i;
unsigned int i;
trace("testing SPI_{GET,SET}SCREENSAVETIMEOUT\n");
rc=SystemParametersInfoA( SPI_GETSCREENSAVETIMEOUT, 0, &old_timeout, 0 );
......@@ -564,7 +564,7 @@ static void test_SPI_SETSCREENSAVEACTIVE( void ) /* 17 */
BOOL rc;
BOOL old_b;
const UINT vals[]={TRUE,FALSE};
int i;
unsigned int i;
trace("testing SPI_{GET,SET}SCREENSAVEACTIVE\n");
rc=SystemParametersInfoA( SPI_GETSCREENSAVEACTIVE, 0, &old_b, 0 );
......@@ -601,7 +601,7 @@ static void test_SPI_SETKEYBOARDDELAY( void ) /* 23 */
BOOL rc;
UINT old_delay;
const UINT vals[]={0,3};
int i;
unsigned int i;
trace("testing SPI_{GET,SET}KEYBOARDDELAY\n");
rc=SystemParametersInfoA( SPI_GETKEYBOARDDELAY, 0, &old_delay, 0 );
......@@ -678,7 +678,7 @@ static void test_SPI_SETICONTITLEWRAP( void ) /* 26 */
BOOL rc;
BOOL old_b;
const UINT vals[]={TRUE,FALSE};
int i;
unsigned int i;
/* These tests hang when XFree86 4.0 for Windows is running (tested on
* WinNT, SP2, Cygwin/XFree 4.1.0. Skip the test when XFree86 is
......@@ -718,7 +718,7 @@ static void test_SPI_SETMENUDROPALIGNMENT( void ) /* 28 */
BOOL rc;
BOOL old_b;
const UINT vals[]={TRUE,FALSE};
int i;
unsigned int i;
trace("testing SPI_{GET,SET}MENUDROPALIGNMENT\n");
rc=SystemParametersInfoA( SPI_GETMENUDROPALIGNMENT, 0, &old_b, 0 );
......@@ -754,7 +754,7 @@ static void test_SPI_SETDOUBLECLKWIDTH( void ) /* 29 */
BOOL rc;
INT old_width;
const UINT vals[]={0,10000};
int i;
unsigned int i;
trace("testing SPI_{GET,SET}DOUBLECLKWIDTH\n");
old_width = GetSystemMetrics( SM_CXDOUBLECLK );
......@@ -785,7 +785,7 @@ static void test_SPI_SETDOUBLECLKHEIGHT( void ) /* 30 */
BOOL rc;
INT old_height;
const UINT vals[]={0,10000};
int i;
unsigned int i;
trace("testing SPI_{GET,SET}DOUBLECLKHEIGHT\n");
old_height = GetSystemMetrics( SM_CYDOUBLECLK );
......@@ -869,7 +869,7 @@ static void test_SPI_SETMOUSEBUTTONSWAP( void ) /* 33 */
BOOL rc;
BOOL old_b;
const UINT vals[]={TRUE,FALSE};
int i;
unsigned int i;
trace("testing SPI_{GET,SET}MOUSEBUTTONSWAP\n");
old_b = GetSystemMetrics( SM_SWAPBUTTON );
......@@ -910,7 +910,7 @@ static void test_SPI_SETDRAGFULLWINDOWS( void ) /* 37 */
BOOL rc;
BOOL old_b;
const UINT vals[]={TRUE,FALSE};
int i;
unsigned int i;
trace("testing SPI_{GET,SET}DRAGFULLWINDOWS\n");
rc=SystemParametersInfoA( SPI_GETDRAGFULLWINDOWS, 0, &old_b, 0 );
......@@ -992,7 +992,7 @@ static void test_SPI_SETSHOWSOUNDS( void ) /* 57 */
BOOL rc;
BOOL old_b;
const UINT vals[]={TRUE,FALSE};
int i;
unsigned int i;
trace("testing SPI_{GET,SET}SHOWSOUNDS\n");
SetLastError(0);
......@@ -1043,7 +1043,7 @@ static void test_SPI_SETMOUSEHOVERWIDTH( void ) /* 99 */
BOOL rc;
UINT old_width;
const UINT vals[]={0,32767};
int i;
unsigned int i;
trace("testing SPI_{GET,SET}MOUSEHOVERWIDTH\n");
rc=SystemParametersInfoA( SPI_GETMOUSEHOVERWIDTH, 0, &old_width, 0 );
......@@ -1085,7 +1085,7 @@ static void test_SPI_SETMOUSEHOVERHEIGHT( void ) /* 101 */
BOOL rc;
UINT old_height;
const UINT vals[]={0,32767};
int i;
unsigned int i;
trace("testing SPI_{GET,SET}MOUSEHOVERHEIGHT\n");
rc=SystemParametersInfoA( SPI_GETMOUSEHOVERHEIGHT, 0, &old_height, 0 );
......@@ -1127,7 +1127,7 @@ static void test_SPI_SETMOUSEHOVERTIME( void ) /* 103 */
BOOL rc;
UINT old_time;
const UINT vals[]={0,32767};
int i;
unsigned int i;
trace("testing SPI_{GET,SET}MOUSEHOVERTIME\n");
rc=SystemParametersInfoA( SPI_GETMOUSEHOVERTIME, 0, &old_time, 0 );
......@@ -1169,7 +1169,7 @@ static void test_SPI_SETWHEELSCROLLLINES( void ) /* 105 */
BOOL rc;
UINT old_lines;
const UINT vals[]={0,32767};
int i;
unsigned int i;
trace("testing SPI_{GET,SET}WHEELSCROLLLINES\n");
rc=SystemParametersInfoA( SPI_GETWHEELSCROLLLINES, 0, &old_lines, 0 );
......@@ -1203,7 +1203,7 @@ static void test_SPI_SETMENUSHOWDELAY( void ) /* 107 */
BOOL rc;
UINT old_delay;
const UINT vals[]={0,32767};
int i;
unsigned int i;
trace("testing SPI_{GET,SET}MENUSHOWDELAY\n");
rc=SystemParametersInfoA( SPI_GETMENUSHOWDELAY, 0, &old_delay, 0 );
......
......@@ -597,7 +597,7 @@ static BOOL RegisterWindowClasses(void)
static void verify_window_info(HWND hwnd, const WINDOWINFO *info, BOOL test_borders)
{
RECT rcWindow, rcClient;
INT border;
UINT border;
DWORD status;
ok(IsWindow(hwnd), "bad window handle\n");
......@@ -610,8 +610,8 @@ static void verify_window_info(HWND hwnd, const WINDOWINFO *info, BOOL test_bord
MapWindowPoints(hwnd, 0, (LPPOINT)&rcClient, 2);
ok(EqualRect(&rcClient, &info->rcClient), "wrong rcClient\n");
ok(info->dwStyle == GetWindowLongA(hwnd, GWL_STYLE), "wrong dwStyle\n");
ok(info->dwExStyle == GetWindowLongA(hwnd, GWL_EXSTYLE), "wrong dwExStyle\n");
ok(info->dwStyle == (DWORD)GetWindowLongA(hwnd, GWL_STYLE), "wrong dwStyle\n");
ok(info->dwExStyle == (DWORD)GetWindowLongA(hwnd, GWL_EXSTYLE), "wrong dwExStyle\n");
status = (GetActiveWindow() == hwnd) ? WS_ACTIVECAPTION : 0;
ok(info->dwWindowStatus == status, "wrong dwWindowStatus\n");
......@@ -620,7 +620,7 @@ static void verify_window_info(HWND hwnd, const WINDOWINFO *info, BOOL test_bord
trace("rcWindow: %ld,%ld - %ld,%ld\n", rcWindow.left, rcWindow.top, rcWindow.right, rcWindow.bottom);
trace("rcClient: %ld,%ld - %ld,%ld\n", rcClient.left, rcClient.top, rcClient.right, rcClient.bottom);
ok(info->cxWindowBorders == rcClient.left - rcWindow.left,
ok(info->cxWindowBorders == (unsigned)(rcClient.left - rcWindow.left),
"wrong cxWindowBorders %d != %ld\n", info->cxWindowBorders, rcClient.left - rcWindow.left);
border = min(rcWindow.bottom - rcClient.bottom, rcClient.top - rcWindow.top);
ok(info->cyWindowBorders == border,
......
......@@ -629,7 +629,7 @@ static void test_so_reuseaddr()
{
struct sockaddr_in saddr;
SOCKET s1,s2;
int rc,reuse,size;
unsigned int rc,reuse,size;
saddr.sin_family = AF_INET;
saddr.sin_port = htons(9375);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment