Alexandre Julliard : user32/tests: Fix pointer casting warnings on 64-bit.
Alexandre Julliard
julliard at winehq.org
Sun Jan 4 09:08:57 CST 2009
Module: wine
Branch: master
Commit: d97b398767b4684e773617a22442400bc718df19
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d97b398767b4684e773617a22442400bc718df19
Author: Alexandre Julliard <julliard at winehq.org>
Date: Sat Jan 3 20:16:16 2009 +0100
user32/tests: Fix pointer casting warnings on 64-bit.
---
dlls/user32/tests/cursoricon.c | 2 +-
dlls/user32/tests/dde.c | 2 +-
dlls/user32/tests/listbox.c | 2 +-
dlls/user32/tests/menu.c | 14 +++++++-------
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c
index 5d1cf2b..fc1ceaa 100644
--- a/dlls/user32/tests/cursoricon.c
+++ b/dlls/user32/tests/cursoricon.c
@@ -175,7 +175,7 @@ static void do_parent(void)
startup.dwFlags = STARTF_USESHOWWINDOW;
startup.wShowWindow = SW_SHOWNORMAL;
- sprintf(path_name, "%s cursoricon %x", test_argv[0], (unsigned int) parent);
+ sprintf(path_name, "%s cursoricon %lx", test_argv[0], (INT_PTR)parent);
ok(CreateProcessA(NULL, path_name, NULL, NULL, FALSE, 0L, NULL, NULL, &startup, &info), "CreateProcess failed.\n");
child_process = info.hProcess;
diff --git a/dlls/user32/tests/dde.c b/dlls/user32/tests/dde.c
index dafb68c..f11e0fe 100644
--- a/dlls/user32/tests/dde.c
+++ b/dlls/user32/tests/dde.c
@@ -160,7 +160,7 @@ static LRESULT WINAPI dde_server_wndproc(HWND hwnd, UINT msg, WPARAM wparam, LPA
lstrcpyA((LPSTR)data->Value, str);
GlobalUnlock(hglobal);
- lparam = PackDDElParam(WM_DDE_ACK, (UINT)hglobal, HIWORD(lparam));
+ lparam = PackDDElParam(WM_DDE_ACK, (UINT_PTR)hglobal, HIWORD(lparam));
PostMessageA(client, WM_DDE_DATA, (WPARAM)hwnd, lparam);
break;
diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c
index c872357..6c89f62 100644
--- a/dlls/user32/tests/listbox.c
+++ b/dlls/user32/tests/listbox.c
@@ -50,7 +50,7 @@ static HWND
create_listbox (DWORD add_style, HWND parent)
{
HWND handle;
- int ctl_id=0;
+ INT_PTR ctl_id=0;
if (parent)
ctl_id=1;
handle=CreateWindow ("LISTBOX", "TestList",
diff --git a/dlls/user32/tests/menu.c b/dlls/user32/tests/menu.c
index adc9410..c0a5f02 100644
--- a/dlls/user32/tests/menu.c
+++ b/dlls/user32/tests/menu.c
@@ -285,7 +285,7 @@ static void test_menu_ownerdraw(void)
NULL, NULL, NULL, NULL);
ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
if( !hwnd) return;
- SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG)menu_ownerdraw_wnd_proc);
+ SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_ownerdraw_wnd_proc);
hmenu = CreatePopupMenu();
ok(hmenu != NULL, "CreateMenu failed with error %d\n", GetLastError());
if( !hmenu) { DestroyWindow(hwnd);return;}
@@ -538,7 +538,7 @@ static void test_menu_bmp_and_string(void)
ok(hwnd != NULL, "CreateWindowEx failed with error %d\n", GetLastError());
if( !hwnd) return;
- SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG)menu_ownerdraw_wnd_proc);
+ SetWindowLongPtr( hwnd, GWLP_WNDPROC, (LONG_PTR)menu_ownerdraw_wnd_proc);
if( winetest_debug)
trace(" check %d,%d arrow %d avechar %d\n",
@@ -552,7 +552,7 @@ static void test_menu_bmp_and_string(void)
for( szidx=0; szidx < sizeof( bmsizes) / sizeof( SIZE); szidx++) {
HBITMAP hbm = CreateBitmap( bmsizes[szidx].cx, bmsizes[szidx].cy,1,1,bmfill);
HBITMAP bitmaps[] = { HBMMENU_CALLBACK, hbm, NULL };
- ok( (int)hbm, "CreateBitmap failed err %d\n", GetLastError());
+ ok( hbm != 0, "CreateBitmap failed err %d\n", GetLastError());
for( txtidx = 0; txtidx < sizeof(MOD_txtsizes)/sizeof(MOD_txtsizes[0]); txtidx++) {
for( hassub = 0; hassub < 2 ; hassub++) { /* add submenu item */
for( mnuopt = 0; mnuopt < 3 ; mnuopt++){ /* test MNS_NOCHECK/MNS_CHECKORBMP */
@@ -1607,7 +1607,7 @@ static void test_menu_search_bycommand( void )
rc = GetMenuItemInfo(hmenu, (UINT_PTR)hmenuSub2, FALSE, &info);
ok (rc, "Getting the menus info failed\n");
- ok (info.wID == (UINT)hmenuSub2, "IDs differ for popup menu\n");
+ ok (info.wID == (UINT_PTR)hmenuSub2, "IDs differ for popup menu\n");
ok (!strcmp(info.dwTypeData, "Submenu2"), "Returned item has wrong label (%s)\n", info.dwTypeData);
DestroyMenu( hmenu );
@@ -1872,7 +1872,7 @@ static void test_menu_flags( void )
hMenu = CreateMenu();
hPopupMenu = CreatePopupMenu();
- AppendMenu(hMenu, MF_POPUP | MF_STRING, (UINT)hPopupMenu, "Popup");
+ AppendMenu(hMenu, MF_POPUP | MF_STRING, (UINT_PTR)hPopupMenu, "Popup");
AppendMenu(hPopupMenu, MF_STRING | MF_HILITE | MF_DEFAULT, 101, "Item 1");
InsertMenu(hPopupMenu, 1, MF_BYPOSITION | MF_STRING | MF_HILITE | MF_DEFAULT, 102, "Item 2");
@@ -1920,7 +1920,7 @@ static void test_menu_hilitemenuitem( void )
hMenu = CreateMenu();
hPopupMenu = CreatePopupMenu();
- AppendMenu(hMenu, MF_POPUP | MF_STRING, (UINT)hPopupMenu, "Popup");
+ AppendMenu(hMenu, MF_POPUP | MF_STRING, (UINT_PTR)hPopupMenu, "Popup");
AppendMenu(hPopupMenu, MF_STRING, 101, "Item 1");
AppendMenu(hPopupMenu, MF_STRING, 102, "Item 2");
@@ -2053,7 +2053,7 @@ static void check_menu_items(HMENU hmenu, UINT checked_cmd, UINT checked_type,
#endif
if (mii.hSubMenu)
{
- ok((HMENU)mii.wID == mii.hSubMenu, "id %u: wID should be equal to hSubMenu\n", checked_cmd);
+ ok(mii.wID == (UINT_PTR)mii.hSubMenu, "id %u: wID should be equal to hSubMenu\n", checked_cmd);
check_menu_items(mii.hSubMenu, checked_cmd, checked_type, checked_state);
}
else
More information about the wine-cvs
mailing list