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

Michael Stefaniuc mstefani at redhat.de
Sun Dec 20 16:33:34 CST 2009


---
 dlls/comctl32/tests/header.c   |    2 +-
 dlls/comctl32/tests/listview.c |    4 ++--
 dlls/comctl32/tests/treeview.c |    6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c
index 8d6ad1f..102327a 100644
--- a/dlls/comctl32/tests/header.c
+++ b/dlls/comctl32/tests/header.c
@@ -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 */
diff --git a/dlls/comctl32/tests/listview.c b/dlls/comctl32/tests/listview.c
index 8017521..a21eb23 100644
--- a/dlls/comctl32/tests/listview.c
+++ b/dlls/comctl32/tests/listview.c
@@ -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);
diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c
index e763feb..c49dd80 100644
--- a/dlls/comctl32/tests/treeview.c
+++ b/dlls/comctl32/tests/treeview.c
@@ -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 */
-- 
1.6.6.rc2



More information about the wine-patches mailing list