Commit a52977dc authored by Alexandre Julliard's avatar Alexandre Julliard

comctl32/tests: Fix pointer casting warnings on 64-bit.

parent 3e7ac7ea
...@@ -182,7 +182,7 @@ static BOOL CheckDPA(HDPA dpa, DWORD dwIn, PDWORD pdwOut) ...@@ -182,7 +182,7 @@ static BOOL CheckDPA(HDPA dpa, DWORD dwIn, PDWORD pdwOut)
do do
{ {
pDPA_InsertPtr(dpa, 0, (PVOID)(dwIn & 0xf)); pDPA_InsertPtr(dpa, 0, (PVOID)(ULONG_PTR)(dwIn & 0xf));
dwIn >>= 4; dwIn >>= 4;
} }
while(dwIn); while(dwIn);
...@@ -242,9 +242,9 @@ static void test_dpa(void) ...@@ -242,9 +242,9 @@ static void test_dpa(void)
for(i = 1; i <= 6; i++) for(i = 1; i <= 6; i++)
{ {
INT j, k; INT j, k;
k = pDPA_GetPtrIndex(dpa, (PVOID)i); k = pDPA_GetPtrIndex(dpa, (PVOID)(INT_PTR)i);
/* Linear searches should work on unsorted DPAs */ /* Linear searches should work on unsorted DPAs */
j = pDPA_Search(dpa, (PVOID)i, 0, CB_CmpLT, 0xdeadbeef, 0); j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, 0, CB_CmpLT, 0xdeadbeef, 0);
ok(j == k, "j=%d k=%d\n", j, k); ok(j == k, "j=%d k=%d\n", j, k);
} }
...@@ -279,16 +279,16 @@ static void test_dpa(void) ...@@ -279,16 +279,16 @@ static void test_dpa(void)
INT j; INT j;
/* The array is in order so ptr == index+1 */ /* The array is in order so ptr == index+1 */
j = pDPA_GetPtrIndex(dpa, (PVOID)i); j = pDPA_GetPtrIndex(dpa, (PVOID)(INT_PTR)i);
ok(j+1 == i, "j=%d i=%d\n", j, i); ok(j+1 == i, "j=%d i=%d\n", j, i);
j = pDPA_Search(dpa, (PVOID)i, 0, CB_CmpLT, 0xdeadbeef, DPAS_SORTED); j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, 0, CB_CmpLT, 0xdeadbeef, DPAS_SORTED);
ok(j+1 == i, "j=%d i=%d\n", j, i); ok(j+1 == i, "j=%d i=%d\n", j, i);
/* Linear searches respect iStart ... */ /* Linear searches respect iStart ... */
j = pDPA_Search(dpa, (PVOID)i, i+1, CB_CmpLT, 0xdeadbeef, 0); j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, i+1, CB_CmpLT, 0xdeadbeef, 0);
ok(j == DPA_ERR, "j=%d\n", j); ok(j == DPA_ERR, "j=%d\n", j);
/* ... but for a binary search it's ignored */ /* ... but for a binary search it's ignored */
j = pDPA_Search(dpa, (PVOID)i, i+1, CB_CmpLT, 0xdeadbeef, DPAS_SORTED); j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, i+1, CB_CmpLT, 0xdeadbeef, DPAS_SORTED);
todo_wine ok(j+1 == i, "j=%d i=%d\n", j, i); todo_wine ok(j+1 == i, "j=%d i=%d\n", j, i);
} }
...@@ -331,7 +331,7 @@ static void test_dpa(void) ...@@ -331,7 +331,7 @@ static void test_dpa(void)
* should be bogus */ * should be bogus */
for(i = 0; i < 6; i++) for(i = 0; i < 6; i++)
{ {
INT j = pDPA_Search(dpa, (PVOID)i, 0, CB_CmpGT, 0xdeadbeef, INT j = pDPA_Search(dpa, (PVOID)(INT_PTR)i, 0, CB_CmpGT, 0xdeadbeef,
DPAS_SORTED|DPAS_INSERTBEFORE); DPAS_SORTED|DPAS_INSERTBEFORE);
ok(j != i, "i=%d\n", i); ok(j != i, "i=%d\n", i);
} }
......
...@@ -234,7 +234,7 @@ static void test_subclass(void) ...@@ -234,7 +234,7 @@ static void test_subclass(void)
ok_sequence(Sub_AfterDeletedTest, "After Deleted"); ok_sequence(Sub_AfterDeletedTest, "After Deleted");
pSetWindowSubclass(hwnd, WndProcSub, 2, 0); pSetWindowSubclass(hwnd, WndProcSub, 2, 0);
origProc3 = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG)WndProc3); origProc3 = (WNDPROC)SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)WndProc3);
SendMessage(hwnd, WM_USER, 1, 0); SendMessage(hwnd, WM_USER, 1, 0);
SendMessage(hwnd, WM_USER, 2, 0); SendMessage(hwnd, WM_USER, 2, 0);
ok_sequence(Sub_OldAfterNewTest, "Old after New"); ok_sequence(Sub_OldAfterNewTest, "Old after New");
......
...@@ -1151,7 +1151,7 @@ static void test_setrows(void) ...@@ -1151,7 +1151,7 @@ static void test_setrows(void)
memset(&rc, 0xCC, sizeof(rc)); memset(&rc, 0xCC, sizeof(rc));
SendMessageA(hToolbar, TB_SETROWS, SendMessageA(hToolbar, TB_SETROWS,
MAKELONG(tbrows_results[i].nRows, tbrows_results[i].bLarger), MAKELONG(tbrows_results[i].nRows, tbrows_results[i].bLarger),
(LONG) &rc); (LPARAM) &rc);
rows = SendMessageA(hToolbar, TB_GETROWS, MAKELONG(0,0), MAKELONG(0,0)); rows = SendMessageA(hToolbar, TB_GETROWS, MAKELONG(0,0), MAKELONG(0,0));
ok(rows == tbrows_results[i].expectedRows, ok(rows == tbrows_results[i].expectedRows,
......
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