Michael Stefaniuc : comctl32/tests: Don't cast NULL to an integer type.
Alexandre Julliard
julliard at winehq.org
Mon Dec 21 09:39:49 CST 2009
Module: wine
Branch: master
Commit: 93d45253cdaadba93d02bb745403faf85fa45473
URL: http://source.winehq.org/git/wine.git/?a=commit;h=93d45253cdaadba93d02bb745403faf85fa45473
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Sun Dec 20 23:33:34 2009 +0100
comctl32/tests: Don't cast NULL to an integer type.
---
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 */
More information about the wine-cvs
mailing list