Commit 93d45253 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

comctl32/tests: Don't cast NULL to an integer type.

parent a29bbda1
......@@ -1756,7 +1756,7 @@ static void test_hdm_orderarray(void)
if (0)
{
/* null pointer, crashes native */
ret = SendMessage(hwnd, HDM_SETORDERARRAY, 3, (LPARAM)NULL);
ret = SendMessage(hwnd, HDM_SETORDERARRAY, 3, 0);
expect(FALSE, ret);
}
/* count out of limits */
......
......@@ -1945,7 +1945,7 @@ static void test_multiselect(void)
expect(items,item_count);
/* try with NULL pointer */
r = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, (LPARAM)NULL);
r = SendMessageA(hwnd, LVM_SETITEMSTATE, 0, 0);
expect(FALSE, r);
/* select all, check notifications */
......@@ -2979,7 +2979,7 @@ static void test_hittest(void)
y = (bounds.bottom - bounds.top) / 2;
test_lvm_subitemhittest(hwnd, x, y, 0, 0, LVHT_ONITEMSTATEICON, FALSE, FALSE, FALSE, __LINE__);
himl2 = (HIMAGELIST)SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, (LPARAM)NULL);
himl2 = (HIMAGELIST)SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_STATE, 0);
ok(himl2 == himl, "should return handle\n");
r = SendMessage(hwnd, LVM_SETIMAGELIST, LVSIL_SMALL, (LPARAM)himl);
......
......@@ -924,7 +924,7 @@ static void test_itemedit(void)
fill_tree(hTree);
/* try with null item */
edit = (HWND)SendMessage(hTree, TVM_EDITLABEL, 0, (LPARAM)NULL);
edit = (HWND)SendMessage(hTree, TVM_EDITLABEL, 0, 0);
ok(!IsWindow(edit), "Expected valid handle\n");
/* trigger edit */
......@@ -934,14 +934,14 @@ static void test_itemedit(void)
r = SendMessage(hTree, TVM_GETITEMSTATE, (WPARAM)hRoot, TVIS_SELECTED);
expect(0, r);
/* try to cancel with wrong edit handle */
r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)NULL);
r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), 0);
expect(0, r);
ok(IsWindow(edit), "Expected edit control to be valid\n");
r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)edit);
expect(0, r);
ok(!IsWindow(edit), "Expected edit control to be destroyed\n");
/* try to cancel without creating edit */
r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)NULL);
r = SendMessage(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), 0);
expect(0, r);
/* try to cancel with wrong (not null) handle */
......
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