On Friday 22 November 2002 03:22 pm, Alexandre Julliard wrote:
ChangeSet ID: 6371 1.154 1.155 +76 -93 wine/controls/menu.c
gcc 3.2 isn't happy with this:
make[2]: Entering directory `/var/src/wine/dlls/user' gcc -c -I. -I. -I../../include -I../../include -march=athlon -O1 -pipe -mmmx -m3dnow -gstabs -g3 -Wall -mpreferred-stack-boundary=2 -fPIC -D__WINE__ -D_USER32_ -D_WINABLE_ -D_REENTRANT -o ../../controls/menu.o ../../controls/menu.c ../../controls/menu.c: In function `MENU_GetBitmapItemSize': ../../controls/menu.c:722: pointers are not permitted as case values ../../controls/menu.c:729: pointers are not permitted as case values ../../controls/menu.c:730: pointers are not permitted as case values ../../controls/menu.c:731: pointers are not permitted as case values ../../controls/menu.c:732: pointers are not permitted as case values ../../controls/menu.c:733: pointers are not permitted as case values ../../controls/menu.c:737: pointers are not permitted as case values ../../controls/menu.c:738: pointers are not permitted as case values ../../controls/menu.c:739: pointers are not permitted as case values ../../controls/menu.c:740: pointers are not permitted as case values ../../controls/menu.c:741: pointers are not permitted as case values ../../controls/menu.c: In function `MENU_DrawBitmapItem': ../../controls/menu.c:778: pointers are not permitted as case values ../../controls/menu.c:793: pointers are not permitted as case values ../../controls/menu.c:796: pointers are not permitted as case values ../../controls/menu.c:799: pointers are not permitted as case values ../../controls/menu.c:802: pointers are not permitted as case values ../../controls/menu.c:805: pointers are not permitted as case values ../../controls/menu.c:808: pointers are not permitted as case values ../../controls/menu.c:809: pointers are not permitted as case values ../../controls/menu.c:810: pointers are not permitted as case values ../../controls/menu.c:811: pointers are not permitted as case values ../../controls/menu.c:812: pointers are not permitted as case values make[2]: *** [../../controls/menu.o] Error 1 make[2]: Leaving directory `/var/src/wine/dlls/user' make[1]: *** [user] Error 2 make[1]: Leaving directory `/var/src/wine/dlls' make: *** [dlls] Error 2
These are DECLARE_HANDLE'ed values. This seems to fix it:
Index: controls/menu.c =================================================================== RCS file: /home/wine/wine/controls/menu.c,v retrieving revision 1.155 diff -u -r1.155 menu.c --- controls/menu.c 22 Nov 2002 21:22:16 -0000 1.155 +++ controls/menu.c 22 Nov 2002 22:13:40 -0000 @@ -719,26 +719,26 @@ { switch(LOWORD(id)) { - case HBMMENU_SYSTEM: + case (WORD)HBMMENU_SYSTEM: if (data) { bmp = (HBITMAP)data; break; } /* fall through */ - case HBMMENU_MBAR_RESTORE: - case HBMMENU_MBAR_MINIMIZE: - case HBMMENU_MBAR_MINIMIZE_D: - case HBMMENU_MBAR_CLOSE: - case HBMMENU_MBAR_CLOSE_D: + case (WORD)HBMMENU_MBAR_RESTORE: + case (WORD)HBMMENU_MBAR_MINIMIZE: + case (WORD)HBMMENU_MBAR_MINIMIZE_D: + case (WORD)HBMMENU_MBAR_CLOSE: + case (WORD)HBMMENU_MBAR_CLOSE_D: size->cx = GetSystemMetrics( SM_CXSIZE ); size->cy = GetSystemMetrics( SM_CYSIZE ); return; - case HBMMENU_CALLBACK: - case HBMMENU_POPUP_CLOSE: - case HBMMENU_POPUP_RESTORE: - case HBMMENU_POPUP_MAXIMIZE: - case HBMMENU_POPUP_MINIMIZE: + case (WORD)HBMMENU_CALLBACK: + case (WORD)HBMMENU_POPUP_CLOSE: + case (WORD)HBMMENU_POPUP_RESTORE: + case (WORD)HBMMENU_POPUP_MAXIMIZE: + case (WORD)HBMMENU_POPUP_MINIMIZE: default: FIXME("Magic 0x%08x not implemented\n", id); return; @@ -775,7 +775,7 @@
switch(LOWORD(lpitem->text)) { - case HBMMENU_SYSTEM: + case (WORD)HBMMENU_SYSTEM: if (lpitem->dwItemData) { bmp = (HBITMAP)lpitem->dwItemData; @@ -790,26 +790,26 @@ bm.bmWidth -= bmp_xoffset; } goto got_bitmap; - case HBMMENU_MBAR_RESTORE: + case (WORD)HBMMENU_MBAR_RESTORE: flags = DFCS_CAPTIONRESTORE; break; - case HBMMENU_MBAR_MINIMIZE: + case (WORD)HBMMENU_MBAR_MINIMIZE: flags = DFCS_CAPTIONMIN; break; - case HBMMENU_MBAR_MINIMIZE_D: + case (WORD)HBMMENU_MBAR_MINIMIZE_D: flags = DFCS_CAPTIONMIN | DFCS_INACTIVE; break; - case HBMMENU_MBAR_CLOSE: + case (WORD)HBMMENU_MBAR_CLOSE: flags = DFCS_CAPTIONCLOSE; break; - case HBMMENU_MBAR_CLOSE_D: + case (WORD)HBMMENU_MBAR_CLOSE_D: flags = DFCS_CAPTIONCLOSE | DFCS_INACTIVE; break; - case HBMMENU_CALLBACK: - case HBMMENU_POPUP_CLOSE: - case HBMMENU_POPUP_RESTORE: - case HBMMENU_POPUP_MAXIMIZE: - case HBMMENU_POPUP_MINIMIZE: + case (WORD)HBMMENU_CALLBACK: + case (WORD)HBMMENU_POPUP_CLOSE: + case (WORD)HBMMENU_POPUP_RESTORE: + case (WORD)HBMMENU_POPUP_MAXIMIZE: + case (WORD)HBMMENU_POPUP_MINIMIZE: default: FIXME("Magic 0x%08x not implemented\n", LOWORD(lpitem->text)); return;