PATCH: shell32 / new compiler

Marcus Meissner marcus at jet.franken.de
Sun Jul 11 12:13:57 CDT 2004


Hi,

Some problems spotted by gcc HEAD.

Ciao, Marcus

Changelog:
	Fixed double applet = applet = assignment.
	Removed sic_hdpa only used in 1 C file as static var.
	Make VT_Shell_IMalloc32 and related variables static.

Index: dlls/shell32/control.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/control.c,v
retrieving revision 1.19
diff -u -r1.19 control.c
--- dlls/shell32/control.c	27 May 2004 01:54:30 -0000	1.19
+++ dlls/shell32/control.c	11 Jul 2004 16:58:38 -0000
@@ -171,7 +171,7 @@
     RECT	rc;
 
     GetClientRect(panel->hWnd, &rc);
-    for (applet = panel->first; applet; applet = applet = applet->next) {
+    for (applet = panel->first; applet; applet = applet->next) {
         for (i = 0; i < applet->count; i++) {
 	    if (!applet->info[i].dwSize) continue;
 	    if (x + XSTEP >= rc.right - rc.left) {
@@ -201,7 +201,7 @@
     hdc = (wParam) ? (HDC)wParam : BeginPaint(panel->hWnd, &ps);
     hOldFont = SelectObject(hdc, GetStockObject(ANSI_VAR_FONT));
     GetClientRect(panel->hWnd, &rc);
-    for (applet = panel->first; applet; applet = applet = applet->next) {
+    for (applet = panel->first; applet; applet = applet->next) {
         for (i = 0; i < applet->count; i++) {
 	    if (x + XSTEP >= rc.right - rc.left) {
 	        x = 0;
Index: dlls/shell32/shell32_main.h
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shell32_main.h,v
retrieving revision 1.89
diff -u -r1.89 shell32_main.h
--- dlls/shell32/shell32_main.h	18 Jun 2004 00:23:38 -0000	1.89
+++ dlls/shell32/shell32_main.h	11 Jul 2004 16:58:38 -0000
@@ -44,7 +44,6 @@
 extern HINSTANCE shell32_hInstance;
 extern HIMAGELIST	ShellSmallIconList;
 extern HIMAGELIST	ShellBigIconList;
-extern HDPA		sic_hdpa;
 
 BOOL WINAPI Shell_GetImageList(HIMAGELIST * lpBigList, HIMAGELIST * lpSmallList);
 
Index: dlls/shell32/shellole.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shellole.c,v
retrieving revision 1.65
diff -u -r1.65 shellole.c
--- dlls/shell32/shellole.c	28 Jun 2004 20:32:53 -0000	1.65
+++ dlls/shell32/shellole.c	11 Jul 2004 16:58:39 -0000
@@ -274,7 +274,7 @@
  */
 
 /* set the vtable later */
-extern ICOM_VTABLE(IMalloc) VT_Shell_IMalloc32;
+static ICOM_VTABLE(IMalloc) VT_Shell_IMalloc32;
 
 /* this is the static object instance */
 typedef struct {
@@ -282,10 +282,10 @@
 	DWORD dummy;
 } _ShellMalloc;
 
-_ShellMalloc Shell_Malloc = { &VT_Shell_IMalloc32,1};
+static _ShellMalloc Shell_Malloc = { &VT_Shell_IMalloc32,1};
 
 /* this is the global allocator of shell32 */
-IMalloc * ShellTaskAllocator = NULL;
+static IMalloc * ShellTaskAllocator = NULL;
 
 /******************************************************************************
  *              IShellMalloc_QueryInterface        [VTABLE]
-- 



More information about the wine-patches mailing list