Commit 61a6f98a authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

comctl32/tests: Avoid using memset() on RECTs.

parent 86ac4583
...@@ -890,8 +890,7 @@ static void test_images(void) ...@@ -890,8 +890,7 @@ static void test_images(void)
r = SendMessageA(hwnd, LVM_INSERTITEMA, 0, (LPARAM) &item); r = SendMessageA(hwnd, LVM_INSERTITEMA, 0, (LPARAM) &item);
ok(r == 0, "should not fail\n"); ok(r == 0, "should not fail\n");
memset(&r1, 0, sizeof r1); SetRect(&r1, LVIR_ICON, 0, 0, 0);
r1.left = LVIR_ICON;
r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM) &r1); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM) &r1);
expect(1, r); expect(1, r);
...@@ -903,8 +902,7 @@ static void test_images(void) ...@@ -903,8 +902,7 @@ static void test_images(void)
r = SendMessageA(hwnd, LVM_INSERTITEMA, 0, (LPARAM) &item); r = SendMessageA(hwnd, LVM_INSERTITEMA, 0, (LPARAM) &item);
ok(r == 0, "should not fail\n"); ok(r == 0, "should not fail\n");
memset(&r2, 0, sizeof r2); SetRect(&r2, LVIR_ICON, 0, 0, 0);
r2.left = LVIR_ICON;
r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM) &r2); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM) &r2);
expect(1, r); expect(1, r);
...@@ -3605,8 +3603,7 @@ static void test_hittest(void) ...@@ -3605,8 +3603,7 @@ static void test_hittest(void)
r = SendMessageA(hwnd, LVM_SETCOLUMNWIDTH, 1, MAKELPARAM(100, 0)); r = SendMessageA(hwnd, LVM_SETCOLUMNWIDTH, 1, MAKELPARAM(100, 0));
expect(TRUE, r); expect(TRUE, r);
memset(&bounds, 0, sizeof(bounds)); SetRect(&bounds, LVIR_BOUNDS, 0, 0, 0);
bounds.left = LVIR_BOUNDS;
r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&bounds); r = SendMessageA(hwnd, LVM_GETITEMRECT, 0, (LPARAM)&bounds);
expect(1, r); expect(1, r);
ok(bounds.bottom - bounds.top > 0, "Expected non zero item height\n"); ok(bounds.bottom - bounds.top > 0, "Expected non zero item height\n");
...@@ -3834,7 +3831,7 @@ static void test_getitemposition(void) ...@@ -3834,7 +3831,7 @@ static void test_getitemposition(void)
expect(TRUE, r); expect(TRUE, r);
ok_sequence(sequences, LISTVIEW_SEQ_INDEX, getitemposition_seq2, "get item position 2", TRUE); ok_sequence(sequences, LISTVIEW_SEQ_INDEX, getitemposition_seq2, "get item position 2", TRUE);
memset(&rect, 0, sizeof(rect)); SetRectEmpty(&rect);
SendMessageA(header, HDM_GETITEMRECT, 0, (LPARAM)&rect); SendMessageA(header, HDM_GETITEMRECT, 0, (LPARAM)&rect);
/* some padding? */ /* some padding? */
expect(2, pt.x); expect(2, pt.x);
......
...@@ -655,8 +655,8 @@ static void test_position(void) ...@@ -655,8 +655,8 @@ static void test_position(void)
oldproc = (WNDPROC)SetWindowLongPtrA(hWndTrackbar, GWLP_WNDPROC, (LONG_PTR)trackbar_no_wmpaint_proc); oldproc = (WNDPROC)SetWindowLongPtrA(hWndTrackbar, GWLP_WNDPROC, (LONG_PTR)trackbar_no_wmpaint_proc);
SetWindowLongPtrA(hWndTrackbar, GWLP_USERDATA, (LONG_PTR)oldproc); SetWindowLongPtrA(hWndTrackbar, GWLP_USERDATA, (LONG_PTR)oldproc);
memset(&rect, 0, sizeof(rect)); SetRectEmpty(&rect);
memset(&rect2, 0, sizeof(rect2)); SetRectEmpty(&rect2);
SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect); SendMessageA(hWndTrackbar, TBM_GETTHUMBRECT, 0, (LPARAM)&rect);
......
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