Various ANSI C compability fixes.

diff --git a/controls/button.c b/controls/button.c
index a974796..2536e05 100644
--- a/controls/button.c
+++ b/controls/button.c
@@ -333,10 +333,10 @@
      * Delegate this to the more generic pushbutton painting
      * method.
      */
-    return BUTTON_DrawPushButton(wndPtr,
-				 hDC,
-				 action,
-				 bHighLighted);
+    BUTTON_DrawPushButton(wndPtr,
+			  hDC,
+			  action,
+			  bHighLighted);
 }
 
 /**********************************************************************
@@ -640,10 +640,11 @@
         BOOL bHighLighted = ((infoPtr->state & BUTTON_HIGHLIGHTED) ||
 			     (infoPtr->state & BUTTON_CHECKED));
 
-        return BUTTON_DrawPushButton(wndPtr,
-				     hDC,
-				     action,
-				     bHighLighted);
+        BUTTON_DrawPushButton(wndPtr,
+			      hDC,
+			      action,
+			      bHighLighted);
+	return;
     }
 
     textlen = 0;
diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c
index 09d9138..d2a09b1 100644
--- a/dlls/comctl32/monthcal.c
+++ b/dlls/comctl32/monthcal.c
@@ -304,7 +304,7 @@
 	HBRUSH hbr;
     HFONT currentFont;
 	TEXTMETRICA tm;
-//    LOGFONTA logFont;
+/*    LOGFONTA logFont; */
 	char buf[20],*thisMonthtxt;
     COLORREF oldTextColor,oldBkColor;
     DWORD dwStyle = GetWindowLongA (hwnd, GWL_STYLE);
diff --git a/dlls/commdlg/filedlg95.c b/dlls/commdlg/filedlg95.c
index 9ddb27b..e7ac21c 100644
--- a/dlls/commdlg/filedlg95.c
+++ b/dlls/commdlg/filedlg95.c
@@ -678,8 +678,8 @@
  */
 static LRESULT FILEDLG95_OnWMCommand(HWND hwnd, WPARAM wParam, LPARAM lParam)
 {
-  WORD wNotifyCode = HIWORD(wParam); // notification code 
-  WORD wID = LOWORD(wParam);         // item, control, or accelerator identifier
+  WORD wNotifyCode = HIWORD(wParam); /* notification code */
+  WORD wID = LOWORD(wParam);         /* item, control, or accelerator identifier */
 
   switch(wID)
   {
diff --git a/dlls/commdlg/filedlgbrowser.c b/dlls/commdlg/filedlgbrowser.c
index 51b3fd2..3a49333 100644
--- a/dlls/commdlg/filedlgbrowser.c
+++ b/dlls/commdlg/filedlgbrowser.c
@@ -354,7 +354,9 @@
                 IShellView_DestroyViewWindow(fodInfos->Shell.FOIShellView);
                 IShellView_Release(fodInfos->Shell.FOIShellView);
             }
-            //ShowWindow(fodInfos->ShellInfos.hwndView,SW_HIDE);
+#if 0
+            ShowWindow(fodInfos->ShellInfos.hwndView,SW_HIDE);
+#endif
             fodInfos->Shell.FOIShellView = psvTmp;
 
             fodInfos->ShellInfos.hwndView = hwndView;
diff --git a/graphics/ddraw.c b/graphics/ddraw.c
index 3a523e0..7e8f136 100644
--- a/graphics/ddraw.c
+++ b/graphics/ddraw.c
@@ -604,31 +604,31 @@
 
 static void _dump_surface_desc(DDSURFACEDESC *lpddsd) {
   int	i;
-  const struct {
+  struct {
     DWORD	mask;
     char	*name;
     void (*func)(void *);
     void        *elt;
-  } flags[] = {
-#define FE(x,func,elt) { x, #x, func, (void *) &(lpddsd->elt)}
-    FE(DDSD_CAPS, _dump_DDSCAPS, ddsCaps),
-    FE(DDSD_HEIGHT, _dump_DWORD, dwHeight),
-    FE(DDSD_WIDTH, _dump_DWORD, dwWidth),
-    FE(DDSD_PITCH, _dump_DWORD, lPitch),
-    FE(DDSD_BACKBUFFERCOUNT, _dump_DWORD, dwBackBufferCount),
-    FE(DDSD_ZBUFFERBITDEPTH, _dump_DWORD, x.dwZBufferBitDepth),
-    FE(DDSD_ALPHABITDEPTH, _dump_DWORD, dwAlphaBitDepth),
-    FE(DDSD_PIXELFORMAT, _dump_pixelformat, ddpfPixelFormat),
-    FE(DDSD_CKDESTOVERLAY, _dump_DDCOLORKEY, ddckCKDestOverlay),
-    FE(DDSD_CKDESTBLT, _dump_DDCOLORKEY, ddckCKDestBlt),
-    FE(DDSD_CKSRCOVERLAY, _dump_DDCOLORKEY, ddckCKSrcOverlay),
-    FE(DDSD_CKSRCBLT, _dump_DDCOLORKEY, ddckCKSrcBlt),
-    FE(DDSD_MIPMAPCOUNT, _dump_DWORD, x.dwMipMapCount),
-    FE(DDSD_REFRESHRATE, _dump_DWORD, x.dwRefreshRate),
-    FE(DDSD_LINEARSIZE, _dump_DWORD, y.dwLinearSize),
-    FE(DDSD_LPSURFACE, _dump_PTR, y.lpSurface)
+  } flags[16], *fe = flags;
+#define FE(x,f,e) do { fe->mask = x;  fe->name = #x; fe->func = f; fe->elt = (void *) &(lpddsd->e); fe++; } while(0)
+    FE(DDSD_CAPS, _dump_DDSCAPS, ddsCaps);
+    FE(DDSD_HEIGHT, _dump_DWORD, dwHeight);
+    FE(DDSD_WIDTH, _dump_DWORD, dwWidth);
+    FE(DDSD_PITCH, _dump_DWORD, lPitch);
+    FE(DDSD_BACKBUFFERCOUNT, _dump_DWORD, dwBackBufferCount);
+    FE(DDSD_ZBUFFERBITDEPTH, _dump_DWORD, x.dwZBufferBitDepth);
+    FE(DDSD_ALPHABITDEPTH, _dump_DWORD, dwAlphaBitDepth);
+    FE(DDSD_PIXELFORMAT, _dump_pixelformat, ddpfPixelFormat);
+    FE(DDSD_CKDESTOVERLAY, _dump_DDCOLORKEY, ddckCKDestOverlay);
+    FE(DDSD_CKDESTBLT, _dump_DDCOLORKEY, ddckCKDestBlt);
+    FE(DDSD_CKSRCOVERLAY, _dump_DDCOLORKEY, ddckCKSrcOverlay);
+    FE(DDSD_CKSRCBLT, _dump_DDCOLORKEY, ddckCKSrcBlt);
+    FE(DDSD_MIPMAPCOUNT, _dump_DWORD, x.dwMipMapCount);
+    FE(DDSD_REFRESHRATE, _dump_DWORD, x.dwRefreshRate);
+    FE(DDSD_LINEARSIZE, _dump_DWORD, y.dwLinearSize);
+    FE(DDSD_LPSURFACE, _dump_PTR, y.lpSurface);
 #undef FE
-  };
+
   for (i=0;i<sizeof(flags)/sizeof(flags[0]);i++)
     if (flags[i].mask & lpddsd->dwFlags) {
       DPRINTF(" - %s : ",flags[i].name);
@@ -3525,7 +3525,7 @@
     const unsigned short * pal = (unsigned short *) palette->screen_palents;
 
     for (y = height; y--; ) {
-#ifdef __i386__
+#if defined(__i386__) && defined(__GNUC__)
       /* gcc generates slightly inefficient code for the the copy / lookup,
        * it generates one excess memory access (to pal) per pixel. Since
        * we know that pal is not modified by the memory write we can
@@ -3615,7 +3615,7 @@
     const unsigned int *pal = (unsigned int *) palette->screen_palents;
     
     for (y = height; y--; ) {
-#ifdef __i386__
+#if defined(__i386__) && defined(__GNUC__)
       /* See comment in pixel_convert_16_to_8 */
       __asm__ __volatile__(
       "xor %%eax,%%eax\n"
diff --git a/include/wine/obj_base.h b/include/wine/obj_base.h
index 66afb6d..bce8fbc 100644
--- a/include/wine/obj_base.h
+++ b/include/wine/obj_base.h
@@ -686,9 +686,9 @@
 
 #endif /* ICOM_CINTERFACE */
 
-    ICOM_METHOD2(HRESULT,QueryInterface,REFIID,riid, LPVOID*,ppvObj);
-    ICOM_METHOD (ULONG,AddRef);
-    ICOM_METHOD (ULONG,Release);
+    ICOM_METHOD2(HRESULT,QueryInterface,REFIID,riid, LPVOID*,ppvObj)
+    ICOM_METHOD (ULONG,AddRef)
+    ICOM_METHOD (ULONG,Release)
 };
 #undef ICOM_INTERFACE
 
diff --git a/msdos/dosmem.c b/msdos/dosmem.c
index b2f27fd..83ed992 100644
--- a/msdos/dosmem.c
+++ b/msdos/dosmem.c
@@ -389,7 +389,7 @@
  */
 static void DOSMEM_MovePointers(LPVOID dest, LPVOID src, DWORD size)
 {
-  unsigned long delta = dest-src;
+  unsigned long delta = (char *) dest - (char *) src;
   unsigned cnt;
   ldt_entry ent;
 
diff --git a/ole/storage32.c b/ole/storage32.c
index 71c84e0..6f33a6c 100644
--- a/ole/storage32.c
+++ b/ole/storage32.c
@@ -3183,7 +3183,7 @@
   ULONG propertyIndex;
   BOOL successRead, successWrite;
   StgProperty chainProperty;
-  BYTE buffer[DEF_SMALL_BLOCK_SIZE];
+  BYTE *buffer;
   BlockChainStream *bbTempChain = NULL;
   BlockChainStream *bigBlockChain = NULL;
 
@@ -3211,11 +3211,12 @@
   cbTotalRead = 0;
   cbTotalWritten = 0;
 
+  buffer = (BYTE *) malloc(DEF_SMALL_BLOCK_SIZE);
   do
   {
     successRead = SmallBlockChainStream_ReadAt(*ppsbChain,
                                                offset,
-                                               sizeof(buffer),
+                                               DEF_SMALL_BLOCK_SIZE,
                                                buffer,
                                                &cbRead);
     cbTotalRead += cbRead;
@@ -3230,6 +3231,7 @@
     offset.LowPart += This->smallBlockSize;
 
   } while (successRead && successWrite);
+  free(buffer);
 
   assert(cbTotalRead == cbTotalWritten);
 
diff --git a/windows/painting.c b/windows/painting.c
index ff559d7..7e74723 100644
--- a/windows/painting.c
+++ b/windows/painting.c
@@ -466,8 +466,13 @@
         HRGN hrg;
         if (wndChild->hrgnUpdate == 1 )
         {
-            RECT r = {0, 0, wndChild->rectWindow.right - wndChild->rectWindow.left,
-                            wndChild->rectWindow.bottom - wndChild->rectWindow.top };
+            RECT r;
+
+	    r.left = 0;
+	    r.top = 0;
+	    r.right = wndChild->rectWindow.right - wndChild->rectWindow.left;
+	    r.bottom = wndChild->rectWindow.bottom - wndChild->rectWindow.top;
+
             hrg = CreateRectRgnIndirect( &r );
         }
         else
@@ -478,8 +483,13 @@
             RECT rect, rectParent;
             if( wndParent->hrgnUpdate == 1 )
             {
-               RECT r = {0, 0, wndParent->rectWindow.right - wndParent->rectWindow.left,
-	         	    wndParent->rectWindow.bottom - wndParent->rectWindow.top };
+	       RECT r;
+
+	       r.left = 0;
+	       r.top = 0;
+	       r.right = wndParent->rectWindow.right - wndParent->rectWindow.left;
+	       r.bottom = wndParent->rectWindow.bottom - wndParent->rectWindow.top;
+
                wndParent->hrgnUpdate = CreateRectRgnIndirect( &r );
             }
             /* we must offset the child region by the offset of the child rect in the parent */