fix warnings in winetests

svn path=/trunk/; revision=18690
This commit is contained in:
Christoph von Wittich 2005-10-22 20:42:20 +00:00
parent 374cb13ded
commit 2eeb25af10
4 changed files with 36 additions and 36 deletions

View file

@ -74,8 +74,8 @@ static void testCursor(HANDLE hCon, COORD sbSize)
c.X = c.Y = 0; c.X = c.Y = 0;
ok(SetConsoleCursorPosition(0, c) == 0, "No handle\n"); ok(SetConsoleCursorPosition(0, c) == 0, "No handle\n");
ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError: expecting %u got %lu\n", ok(GetLastError() == ERROR_INVALID_HANDLE, "GetLastError: expecting %lu got %lu\n",
ERROR_INVALID_HANDLE, GetLastError()); (DWORD) ERROR_INVALID_HANDLE, (DWORD) GetLastError());
c.X = c.Y = 0; c.X = c.Y = 0;
ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left\n"); ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left\n");
@ -89,26 +89,26 @@ static void testCursor(HANDLE hCon, COORD sbSize)
c.X = sbSize.X; c.X = sbSize.X;
c.Y = sbSize.Y - 1; c.Y = sbSize.Y - 1;
ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside\n"); ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %lu\n", ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %lu got %lu\n",
ERROR_INVALID_PARAMETER, GetLastError()); (DWORD) ERROR_INVALID_PARAMETER, (DWORD) GetLastError());
c.X = sbSize.X - 1; c.X = sbSize.X - 1;
c.Y = sbSize.Y; c.Y = sbSize.Y;
ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside\n"); ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %lu\n", ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %lu got %lu\n",
ERROR_INVALID_PARAMETER, GetLastError()); (DWORD) ERROR_INVALID_PARAMETER, (DWORD) GetLastError());
c.X = -1; c.X = -1;
c.Y = 0; c.Y = 0;
ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside\n"); ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %lu\n", ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %lu got %lu\n",
ERROR_INVALID_PARAMETER, GetLastError()); (DWORD) ERROR_INVALID_PARAMETER, (DWORD) GetLastError());
c.X = 0; c.X = 0;
c.Y = -1; c.Y = -1;
ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside\n"); ok(SetConsoleCursorPosition(hCon, c) == 0, "Cursor is outside\n");
ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %u got %lu\n", ok(GetLastError() == ERROR_INVALID_PARAMETER, "GetLastError: expecting %lu got %lu\n",
ERROR_INVALID_PARAMETER, GetLastError()); (DWORD) ERROR_INVALID_PARAMETER, (DWORD) GetLastError());
} }
static void testWriteSimple(HANDLE hCon, COORD sbSize) static void testWriteSimple(HANDLE hCon, COORD sbSize)

View file

@ -251,13 +251,13 @@ static void test_FunnyChars(CHAR *curdir,CHAR *curdir_short,CHAR *filename, INT
ok(passfail.longlen==0,"GetLongPathNameA passed when it shouldn't have\n"); ok(passfail.longlen==0,"GetLongPathNameA passed when it shouldn't have\n");
if(valid) { if(valid) {
ok(passfail.longerror==ERROR_FILE_NOT_FOUND, ok(passfail.longerror==ERROR_FILE_NOT_FOUND,
"%s: GetLongPathA returned %ld and not %d\n", "%s: GetLongPathA returned %ld and not %ld\n",
errstr,passfail.longerror,ERROR_FILE_NOT_FOUND); errstr,passfail.longerror,(DWORD) ERROR_FILE_NOT_FOUND);
} else { } else {
ok(passfail.longerror==ERROR_INVALID_NAME || ok(passfail.longerror==ERROR_INVALID_NAME ||
passfail.longerror==ERROR_FILE_NOT_FOUND, passfail.longerror==ERROR_FILE_NOT_FOUND,
"%s: GetLongPathA returned %ld and not %d or %d'\n", "%s: GetLongPathA returned %ld and not %ld or %ld'\n",
errstr, passfail.longerror,ERROR_INVALID_NAME,ERROR_FILE_NOT_FOUND); errstr, passfail.longerror,(DWORD) ERROR_INVALID_NAME,(DWORD)ERROR_FILE_NOT_FOUND);
} }
} }
} }

View file

@ -390,23 +390,23 @@ static void test_RtlLargeIntegerToChar(void)
value = largeint2str[0].value; value = largeint2str[0].value;
result = pRtlLargeIntegerToChar(&value, 20, largeint2str[0].MaximumLength, NULL); result = pRtlLargeIntegerToChar(&value, 20, largeint2str[0].MaximumLength, NULL);
ok(result == STATUS_INVALID_PARAMETER, ok(result == STATUS_INVALID_PARAMETER,
"(test a): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x\n", "(test a): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %lx\n",
largeint2str[0].value, 20, largeint2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER); largeint2str[0].value, 20, largeint2str[0].MaximumLength, result, (DWORD) STATUS_INVALID_PARAMETER);
result = pRtlLargeIntegerToChar(&value, 20, 0, NULL); result = pRtlLargeIntegerToChar(&value, 20, 0, NULL);
ok(result == STATUS_INVALID_PARAMETER, ok(result == STATUS_INVALID_PARAMETER,
"(test b): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x\n", "(test b): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %lx\n",
largeint2str[0].value, 20, largeint2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER); largeint2str[0].value, 20, largeint2str[0].MaximumLength, result, (DWORD) STATUS_INVALID_PARAMETER);
result = pRtlLargeIntegerToChar(&value, largeint2str[0].base, 0, NULL); result = pRtlLargeIntegerToChar(&value, largeint2str[0].base, 0, NULL);
ok(result == STATUS_BUFFER_OVERFLOW, ok(result == STATUS_BUFFER_OVERFLOW,
"(test c): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x\n", "(test c): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %lx\n",
largeint2str[0].value, largeint2str[0].base, 0, result, STATUS_BUFFER_OVERFLOW); largeint2str[0].value, largeint2str[0].base, 0, result, (DWORD) STATUS_BUFFER_OVERFLOW);
result = pRtlLargeIntegerToChar(&value, largeint2str[0].base, largeint2str[0].MaximumLength, NULL); result = pRtlLargeIntegerToChar(&value, largeint2str[0].base, largeint2str[0].MaximumLength, NULL);
ok(result == STATUS_ACCESS_VIOLATION, ok(result == STATUS_ACCESS_VIOLATION,
"(test d): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %x\n", "(test d): RtlLargeIntegerToChar(%llu, %d, %d, NULL) has result %lx, expected: %lx\n",
largeint2str[0].value, largeint2str[0].base, largeint2str[0].MaximumLength, result, STATUS_ACCESS_VIOLATION); largeint2str[0].value, largeint2str[0].base, largeint2str[0].MaximumLength, result, (DWORD) STATUS_ACCESS_VIOLATION);
} }

View file

@ -199,8 +199,8 @@ static void test_RtlInitUnicodeStringEx(void)
uni.Buffer = (void *) 0xdeadbeef; uni.Buffer = (void *) 0xdeadbeef;
result = pRtlInitUnicodeStringEx(&uni, teststring); result = pRtlInitUnicodeStringEx(&uni, teststring);
ok(result == STATUS_SUCCESS, ok(result == STATUS_SUCCESS,
"pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %x\n", "pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %lx\n",
result, STATUS_SUCCESS); result, (DWORD) STATUS_SUCCESS);
ok(uni.Length == 32, ok(uni.Length == 32,
"pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n", "pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n",
uni.Length, 32); uni.Length, 32);
@ -230,8 +230,8 @@ static void test_RtlInitUnicodeStringEx(void)
uni.Buffer = (void *) 0xdeadbeef; uni.Buffer = (void *) 0xdeadbeef;
result = pRtlInitUnicodeStringEx(&uni, teststring2); result = pRtlInitUnicodeStringEx(&uni, teststring2);
ok(result == STATUS_NAME_TOO_LONG, ok(result == STATUS_NAME_TOO_LONG,
"pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %x\n", "pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %lx\n",
result, STATUS_NAME_TOO_LONG); result, (DWORD) STATUS_NAME_TOO_LONG);
ok(uni.Length == 12345, ok(uni.Length == 12345,
"pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n", "pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n",
uni.Length, 12345); uni.Length, 12345);
@ -263,8 +263,8 @@ static void test_RtlInitUnicodeStringEx(void)
uni.Buffer = (void *) 0xdeadbeef; uni.Buffer = (void *) 0xdeadbeef;
result = pRtlInitUnicodeStringEx(&uni, 0); result = pRtlInitUnicodeStringEx(&uni, 0);
ok(result == STATUS_SUCCESS, ok(result == STATUS_SUCCESS,
"pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %x\n", "pRtlInitUnicodeStringEx(&uni, 0) returns %lx, expected %lx\n",
result, STATUS_SUCCESS); result, (DWORD) STATUS_SUCCESS);
ok(uni.Length == 0, ok(uni.Length == 0,
"pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n", "pRtlInitUnicodeStringEx(&uni, 0) sets Length to %u, expected %u\n",
uni.Length, 0); uni.Length, 0);
@ -1650,23 +1650,23 @@ static void test_RtlIntegerToChar(void)
result = pRtlIntegerToChar(int2str[0].value, 20, int2str[0].MaximumLength, NULL); result = pRtlIntegerToChar(int2str[0].value, 20, int2str[0].MaximumLength, NULL);
ok(result == STATUS_INVALID_PARAMETER, ok(result == STATUS_INVALID_PARAMETER,
"(test a): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x\n", "(test a): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %lx\n",
int2str[0].value, 20, int2str[0].MaximumLength, result, STATUS_INVALID_PARAMETER); int2str[0].value, 20, int2str[0].MaximumLength, result, (DWORD) STATUS_INVALID_PARAMETER);
result = pRtlIntegerToChar(int2str[0].value, 20, 0, NULL); result = pRtlIntegerToChar(int2str[0].value, 20, 0, NULL);
ok(result == STATUS_INVALID_PARAMETER, ok(result == STATUS_INVALID_PARAMETER,
"(test b): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x\n", "(test b): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %lx\n",
int2str[0].value, 20, 0, result, STATUS_INVALID_PARAMETER); int2str[0].value, 20, 0, result, (DWORD) STATUS_INVALID_PARAMETER);
result = pRtlIntegerToChar(int2str[0].value, int2str[0].base, 0, NULL); result = pRtlIntegerToChar(int2str[0].value, int2str[0].base, 0, NULL);
ok(result == STATUS_BUFFER_OVERFLOW, ok(result == STATUS_BUFFER_OVERFLOW,
"(test c): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x\n", "(test c): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %lx\n",
int2str[0].value, int2str[0].base, 0, result, STATUS_BUFFER_OVERFLOW); int2str[0].value, int2str[0].base, 0, result, (DWORD) STATUS_BUFFER_OVERFLOW);
result = pRtlIntegerToChar(int2str[0].value, int2str[0].base, int2str[0].MaximumLength, NULL); result = pRtlIntegerToChar(int2str[0].value, int2str[0].base, int2str[0].MaximumLength, NULL);
ok(result == STATUS_ACCESS_VIOLATION, ok(result == STATUS_ACCESS_VIOLATION,
"(test d): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %x\n", "(test d): RtlIntegerToChar(%lu, %d, %d, NULL) has result %lx, expected: %lx\n",
int2str[0].value, int2str[0].base, int2str[0].MaximumLength, result, STATUS_ACCESS_VIOLATION); int2str[0].value, int2str[0].base, int2str[0].MaximumLength, result, (DWORD) STATUS_ACCESS_VIOLATION);
} }
static const WCHAR szGuid[] = { '{','0','1','0','2','0','3','0','4','-', static const WCHAR szGuid[] = { '{','0','1','0','2','0','3','0','4','-',