Fixed ANSI C violations.

diff --git a/dlls/commdlg/filedlg95.c b/dlls/commdlg/filedlg95.c
index 817c8c8..95f936e 100644
--- a/dlls/commdlg/filedlg95.c
+++ b/dlls/commdlg/filedlg95.c
@@ -1362,7 +1362,7 @@
 	  iExt = CBGetCurSel(fodInfos->DlgInfos.hwndFileTypeCB);
 	  lpOrg = (LPSTR) CBGetItemDataPtr(fodInfos->DlgInfos.hwndFileTypeCB, iExt);
 	  if ((int)lpOrg == -1)
-	      lpOrg = NULL;	// we get -1 if the filetype LB is empty 
+	      lpOrg = NULL;	/* we get -1 if the filetype LB is empty */
 
 	  lpstrExt = lpOrg;
 
diff --git a/dlls/dplayx/dplobby.c b/dlls/dplayx/dplobby.c
index 5bcd6fe..3c6b9c7 100644
--- a/dlls/dplayx/dplobby.c
+++ b/dlls/dplayx/dplobby.c
@@ -740,7 +740,7 @@
   BOOL bAnsiInterface )
 {
   const DWORD dwNumAddElements = 2; /* Service Provide & address data type */
-  DPCOMPOUNDADDRESSELEMENT addressElements[ dwNumAddElements ];
+  DPCOMPOUNDADDRESSELEMENT addressElements[ 2 /* dwNumAddElements */ ];
 
   TRACE( "(%p)->(%p,%p,0x%08lx,%p,%p,%d)\n", guidSP, guidDataType, lpData, dwDataSize, 
                                              lpAddress, lpdwAddressSize, bAnsiInterface );
@@ -817,7 +817,7 @@
     }
 
     dwSizeThisEnumeration  = sizeof( DPADDRESS ) + lpElements->dwDataSize;
-    lpAddress             += dwSizeThisEnumeration;
+    lpAddress = (char *) lpAddress + dwSizeThisEnumeration;
     dwTotalSizeEnumerated += dwSizeThisEnumeration;
   }
 
@@ -1589,10 +1589,10 @@
 
     lpdpAddress->guidDataType = DPAID_TotalSize;
     lpdpAddress->dwDataSize = sizeof( DWORD );
-    lpAddress += sizeof( DPADDRESS );
+    lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
 
     *(LPDWORD)lpAddress = dwSizeRequired;
-    lpAddress += sizeof( DWORD );
+    lpAddress = (char *) lpAddress + sizeof( DWORD );
   }
 
   /* Calculate the size of the buffer required */
@@ -1608,10 +1608,10 @@
 
       lpdpAddress->guidDataType = lpElements->guidDataType;
       lpdpAddress->dwDataSize = sizeof( GUID );
-      lpAddress += sizeof( DPADDRESS );
+      lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
 
       *((LPGUID)lpAddress) = *((LPGUID)lpElements->lpData);
-      lpAddress += sizeof( GUID );
+      lpAddress = (char *) lpAddress + sizeof( GUID );
     }
     else if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Phone ) ) ||
               ( IsEqualGUID( &lpElements->guidDataType, &DPAID_Modem ) ) || 
@@ -1622,12 +1622,12 @@
 
       lpdpAddress->guidDataType = lpElements->guidDataType;
       lpdpAddress->dwDataSize = lpElements->dwDataSize;
-      lpAddress += sizeof( DPADDRESS );
+      lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
 
       lstrcpynA( (LPSTR)lpAddress, 
                  (LPCSTR)lpElements->lpData, 
                  lpElements->dwDataSize );
-      lpAddress += lpElements->dwDataSize;
+      lpAddress = (char *) lpAddress + lpElements->dwDataSize;
     }
     else if ( ( IsEqualGUID( &lpElements->guidDataType, &DPAID_PhoneW ) ) ||
               ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ModemW ) ) ||
@@ -1638,12 +1638,12 @@
 
       lpdpAddress->guidDataType = lpElements->guidDataType;
       lpdpAddress->dwDataSize = lpElements->dwDataSize;
-      lpAddress += sizeof( DPADDRESS );
+      lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
 
       lstrcpynW( (LPWSTR)lpAddress,
                  (LPCWSTR)lpElements->lpData,
                  lpElements->dwDataSize );
-      lpAddress += lpElements->dwDataSize * sizeof( WCHAR );
+      lpAddress = (char *) lpAddress + lpElements->dwDataSize * sizeof( WCHAR );
     }
     else if ( IsEqualGUID( &lpElements->guidDataType, &DPAID_INetPort ) )
     {
@@ -1651,10 +1651,10 @@
 
       lpdpAddress->guidDataType = lpElements->guidDataType;
       lpdpAddress->dwDataSize = lpElements->dwDataSize;
-      lpAddress += sizeof( DPADDRESS );
+      lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
 
       *((LPWORD)lpAddress) = *((LPWORD)lpElements->lpData);
-      lpAddress += sizeof( WORD );
+      lpAddress = (char *) lpAddress + sizeof( WORD );
     }
     else if ( IsEqualGUID( &lpElements->guidDataType, &DPAID_ComPort ) )
     {
@@ -1662,10 +1662,10 @@
 
       lpdpAddress->guidDataType = lpElements->guidDataType;
       lpdpAddress->dwDataSize = lpElements->dwDataSize;
-      lpAddress += sizeof( DPADDRESS );
+      lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
 
       memcpy( lpAddress, lpElements->lpData, sizeof( DPADDRESS ) ); 
-      lpAddress += sizeof( DPADDRESS );
+      lpAddress = (char *) lpAddress + sizeof( DPADDRESS );
     }
   }
 
diff --git a/dlls/icmp/icmp_main.c b/dlls/icmp/icmp_main.c
index 0627eef..00399a2 100644
--- a/dlls/icmp/icmp_main.c
+++ b/dlls/icmp/icmp_main.c
@@ -302,8 +302,8 @@
     timeout.tv_usec=(Timeout % 1000)*1000;
     addrlen=sizeof(addr);
     ier=ReplyBuffer;
-    ip_header=ReplyBuffer+sizeof(ICMP_ECHO_REPLY);
-    endbuf=ReplyBuffer+ReplySize;
+    ip_header=(struct ip *) ((char *) ReplyBuffer+sizeof(ICMP_ECHO_REPLY));
+    endbuf=(char *) ReplyBuffer+ReplySize;
     maxlen=ReplySize-sizeof(ICMP_ECHO_REPLY);
 
     /* Send the packet */
@@ -457,7 +457,7 @@
             ier->Options.Flags=ip_header->ip_off >> 13;
             ier->Options.OptionsSize=ip_header_len-sizeof(struct ip);
             if (ier->Options.OptionsSize!=0) {
-                ier->Options.OptionsData=ier->Data-ier->Options.OptionsSize;
+                ier->Options.OptionsData=(unsigned char *) ier->Data-ier->Options.OptionsSize;
                 /* FIXME: We are supposed to rearrange the option's 'source route' data */
                 memmove(ier->Options.OptionsData,((char*)ip_header)+ip_header_len,ier->Options.OptionsSize);
                 endbuf=ier->Options.OptionsData;
diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c
index 7451bdc..8fae402 100644
--- a/dlls/ntdll/reg.c
+++ b/dlls/ntdll/reg.c
@@ -283,7 +283,7 @@
 	      DOSFS_UnixTimeToFileTime(req->modif, &kni->LastWriteTime, 0);
 	      kni->TitleIndex = 0;
 	      memcpy (kni->Name, req->name, kni->NameLength);
-	      if (kni->ClassLength) memcpy (KeyInformation+kni->ClassOffset, req->class, kni->ClassLength);
+	      if (kni->ClassLength) memcpy ((char *) KeyInformation + kni->ClassOffset, req->class, kni->ClassLength);
 	    }
 	    break;
 	  default:
@@ -347,7 +347,7 @@
 	      kfi->Values = req->values;
 	      kfi->MaxValueNameLen = req->max_value;
 	      kfi->MaxValueDataLen = req->max_data;
-	      if(kfi->ClassLength) memcpy (KeyInformation+kfi->ClassOffset, req->class, kfi->ClassLength);
+	      if(kfi->ClassLength) memcpy ((char *) KeyInformation + kfi->ClassOffset, req->class, kfi->ClassLength);
 	    }
 	    break;
 	  case KeyNodeInformation:
@@ -364,7 +364,7 @@
 	      DOSFS_UnixTimeToFileTime(req->modif, &kni->LastWriteTime, 0);
 	      kni->TitleIndex = 0;
 	      memcpy (kni->Name, req->name, kni->NameLength);
-	      if(kni->ClassLength) memcpy (KeyInformation+kni->ClassOffset, req->class, kni->ClassLength);
+	      if(kni->ClassLength) memcpy ((char *) KeyInformation + kni->ClassOffset, req->class, kni->ClassLength);
 	    }
 	    break;
 	  default:
@@ -568,7 +568,7 @@
 	      kfi->NameLength = 0;
 	      kfi->DataOffset = DataOffset;
 	      kfi->DataLength = req->len;
-	      memcpy(KeyValueInformation+DataOffset, req->data, req->len);
+	      memcpy((char *) KeyValueInformation + DataOffset, req->data, req->len);
 	    }  
 	    break;
 	  case KeyValuePartialInformation:
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
index 4e81e9f..1a2c631 100644
--- a/dlls/odbc32/proxyodbc.c
+++ b/dlls/odbc32/proxyodbc.c
@@ -21,7 +21,7 @@
 #define _WINDOWS
 #endif
 
-typedef char* 		GUID;  //This definition is in sqltypes.h, but if _WINDOWS is defined, this is skipped.
+typedef char* 		GUID;  /* This definition is in sqltypes.h, but if _WINDOWS is defined, this is skipped. */
 
 #include "sql.h"
 #include "sqltypes.h"
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index a5b34d6..94983a8 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -531,7 +531,7 @@
 
 static void TLB_abort()
 {
-		*((int *)0)=0;
+    DebugBreak();
 }
 static void * TLB_Alloc(unsigned size)
 {
diff --git a/dlls/shell32/changenotify.c b/dlls/shell32/changenotify.c
index 7ae4ece..f880dc1 100644
--- a/dlls/shell32/changenotify.c
+++ b/dlls/shell32/changenotify.c
@@ -195,8 +195,9 @@
 void WINAPI SHChangeNotifyAW (LONG wEventId, UINT  uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
 {
 	if(VERSION_OsIsUnicode())
-	  return SHChangeNotifyW (wEventId, uFlags, dwItem1, dwItem2);
-	return SHChangeNotifyA (wEventId, uFlags, dwItem1, dwItem2);
+	  SHChangeNotifyW (wEventId, uFlags, dwItem1, dwItem2);
+	else
+	  SHChangeNotifyA (wEventId, uFlags, dwItem1, dwItem2);
 }
 
 /*************************************************************************
diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c
index dbf60e8..46e6b24 100644
--- a/dlls/shell32/shellord.c
+++ b/dlls/shell32/shellord.c
@@ -422,19 +422,19 @@
 DWORD WINAPI SHFree(LPVOID x) 
 {
 #if MEM_DEBUG
-	WORD len = *(LPWORD)(x-2);
+	WORD len = *(LPWORD)((LPBYTE)x-2);
 
-	if ( *(LPWORD)(x+len) != 0x7384)
+	if ( *(LPWORD)((LPBYTE)x+len) != 0x7384)
 	  ERR("MAGIC2!\n");
 
-	if ( (*(LPWORD)(x-4)) != 0x8271)
+	if ( (*(LPWORD)((LPBYTE)x-4)) != 0x8271)
 	  ERR("MAGIC1!\n");
 	else
-	  memset(x-4, 0xde, len+6);
+	  memset((LPBYTE)x-4, 0xde, len+6);
 
 	TRACE("%p len=%u\n",x, len);
 
-	x -= 4;
+	x = (LPBYTE) x - 4;
 #else
 	TRACE("%p\n",x);
 #endif
diff --git a/graphics/x11drv/dib.c b/graphics/x11drv/dib.c
index bc6acc6..7784921 100644
--- a/graphics/x11drv/dib.c
+++ b/graphics/x11drv/dib.c
@@ -1699,7 +1699,7 @@
         case 24:
         case 32:
             {
-                if( bmpImage->blue_mask == 0xff && bmpImage->red_mask == 0xff0000 )  // packed BGR to unpacked BGR
+	        if( bmpImage->blue_mask == 0xff && bmpImage->red_mask == 0xff0000 )  /* packed BGR to unpacked BGR */
                 {
                     DWORD *dstpixel, val, buf;
                     DWORD *ptr = (DWORD *)(srcbits + left*3);
@@ -1711,25 +1711,25 @@
                     {
                         dstpixel = (DWORD *) (bmpImage->data + h*bmpImage->bytes_per_line + left*4);
 
-                        for (x = 0; x < dstwidth/4; x++) {   // do 3 dwords source, 4 dwords dest at a time
+                        for (x = 0; x < dstwidth/4; x++) {   /* do 3 dwords source, 4 dwords dest at a time */
                             buf = *ptr++;
-                            *dstpixel++ = buf&0x00ffffff;                  // b1, g1, r1
-                            val = (buf >> 24);                             // b2
+                            *dstpixel++ = buf&0x00ffffff;                  /* b1, g1, r1 */
+                            val = (buf >> 24);                             /* b2 */
                             buf = *ptr++;
-                            *dstpixel++ = (val | (buf<<8)) &0x00ffffff;    // g2, r2
-                            val = (buf >> 16);                             // b3, g3
+                            *dstpixel++ = (val | (buf<<8)) &0x00ffffff;    /* g2, r2 */
+                            val = (buf >> 16);                             /* b3, g3 */
                             buf = *ptr++;
-                            *dstpixel++ = (val | (buf<<16)) &0x00ffffff;   // r3
-                            *dstpixel++ = (buf >> 8);                      // b4, g4, r4
+                            *dstpixel++ = (val | (buf<<16)) &0x00ffffff;   /* r3 */
+                            *dstpixel++ = (buf >> 8);                      /* b4, g4, r4 */
                         }
-                        for ( divk=div, bits=(BYTE*)ptr; divk>0; divk--, bits+=3 ) // do remainder
+                        for ( divk=div, bits=(BYTE*)ptr; divk>0; divk--, bits+=3 ) /* do remainder */
                         {
-                            *dstpixel++ = *(DWORD*)bits & 0x00ffffff;      // b, g, r
+			    *dstpixel++ = *(DWORD*)bits & 0x00ffffff;      /* b, g, r */
                         }
                         ptr = (DWORD*)((srcbits+=linebytes)+left*3);
                     }
                 }
-		else if( bmpImage->blue_mask == 0xff0000 && bmpImage->red_mask == 0xff )  // packed BGR to unpacked RGB
+		else if( bmpImage->blue_mask == 0xff0000 && bmpImage->red_mask == 0xff )  /* packed BGR to unpacked RGB */
                 {
                     DWORD *dstpixel, val, buf;
                     DWORD *ptr = (DWORD *)(srcbits + left*3);
@@ -1741,21 +1741,21 @@
                     {
                         dstpixel = (DWORD *) (bmpImage->data + h*bmpImage->bytes_per_line + left*4);
 
-                        for (x = 0; x < dstwidth/4; x++) {   // do 3 dwords source, 4 dwords dest at a time
+                        for (x = 0; x < dstwidth/4; x++) {   /* do 3 dwords source, 4 dwords dest at a time */
                             buf = *ptr++;
-                            *dstpixel++ = ((buf&0xff)<<16) | (buf&0xff00) | ((buf&0xff0000)>>16);  // b1, g1, r1
-                            val = ((buf&0xff000000)>>8);                                           // b2
+                            *dstpixel++ = ((buf&0xff)<<16) | (buf&0xff00) | ((buf&0xff0000)>>16);  /* b1, g1, r1 */
+                            val = ((buf&0xff000000)>>8);                                           /* b2 */
                             buf = *ptr++;
-                            *dstpixel++ = val | ((buf&0xff)<<8) | ((buf&0xff00)>>8);               // g2, r2
-                            val = (buf&0xff0000) | ((buf&0xff000000)>>16);                         // b3, g3
+                            *dstpixel++ = val | ((buf&0xff)<<8) | ((buf&0xff00)>>8);               /* g2, r2 */
+                            val = (buf&0xff0000) | ((buf&0xff000000)>>16);                         /* b3, g3 */
                             buf = *ptr++;
-                            *dstpixel++ = val | (buf&0xff);                                        // r3
-                            *dstpixel++ = ((buf&0xff00)<<8) | ((buf&0xff0000)>>8) | (buf>>24);     // b4, g4, r4
+                            *dstpixel++ = val | (buf&0xff);                                        /* r3 */
+                            *dstpixel++ = ((buf&0xff00)<<8) | ((buf&0xff0000)>>8) | (buf>>24);     /* b4, g4, r4 */
                         }
-                        for ( divk=div, bits=(BYTE*)ptr; divk>0; divk--, bits+=3 ) // do remainder
+                        for ( divk=div, bits=(BYTE*)ptr; divk>0; divk--, bits+=3 ) /* do remainder */
                         {
                             buf = *(DWORD*)bits;
-                            *dstpixel++ = ((buf&0xff)<<16) | (buf&0xff00) | ((buf&0xff0000)>>16);  // b, g, r
+                            *dstpixel++ = ((buf&0xff)<<16) | (buf&0xff00) | ((buf&0xff0000)>>16);  /* b, g, r */
                         }
                         ptr = (DWORD*)((srcbits+=linebytes)+left*3);
                     }
@@ -1767,7 +1767,7 @@
 
         case 15:
             {
-                if( bmpImage->blue_mask == 0x7c00 && bmpImage->red_mask == 0x1f )   // BGR888 to RGB555
+	        if( bmpImage->blue_mask == 0x7c00 && bmpImage->red_mask == 0x1f )   /* BGR888 to RGB555 */
                 {
                     DWORD  *ptr = (DWORD *)(srcbits + left*3), val;
                     LPBYTE bits;
@@ -1775,7 +1775,7 @@
                     int div = dstwidth % 4;
                     int divk;
 
-                    for (h = lines - 1; h >= 0; h--) {              //Do 4 pixels at a time
+                    for (h = lines - 1; h >= 0; h--) {              /* Do 4 pixels at a time */
                         dstpixel = (LPWORD) (bmpImage->data + h * bmpImage->bytes_per_line + left*2);
                         for (x = 0; x < dstwidth/4; x++) {
                             *dstpixel++ = (WORD)((((val = *ptr++) << 7) & 0x7c00) | ((val >> 6) & 0x03e0) | ((val >> 19) & 0x1f));
@@ -1783,14 +1783,14 @@
                             *dstpixel++ = (WORD)(((val >> 9) & 0x07c00) | ((val >> 22) & 0x03e0) | (((val = *ptr++) >> 3) & 0x1f));
                             *dstpixel++ = (WORD)(((val >> 1) & 0x07c00) | ((val >> 14) & 0x03e0) | ((val >> 27) & 0x1f));
                         }
-                        for (bits = (LPBYTE)ptr, divk=div; divk > 0; divk--, bits+=3)  //dstwidth not divisible by 4?
+                        for (bits = (LPBYTE)ptr, divk=div; divk > 0; divk--, bits+=3)  /* dstwidth not divisible by 4? */
                             *dstpixel++ = (((WORD)bits[0] << 7) & 0x07c00) |
                                             (((WORD)bits[1] << 2) & 0x03e0) |
                                             (((WORD)bits[2] >> 3) & 0x001f);
                         ptr = (DWORD *)((srcbits += linebytes) + left * 3);
                     }
                 }
-                else if( bmpImage->blue_mask == 0x1f && bmpImage->red_mask == 0x7c00 )   // BGR888 to BGR555
+                else if( bmpImage->blue_mask == 0x1f && bmpImage->red_mask == 0x7c00 )   /* BGR888 to BGR555 */
                 {
                     DWORD  *ptr = (DWORD *)(srcbits + left*3), val;
                     LPBYTE bits;
@@ -1798,7 +1798,7 @@
                     int div = dstwidth % 4;
                     int divk;
 
-                    for (h = lines - 1; h >= 0; h--) {              //Do 4 pixels at a time
+                    for (h = lines - 1; h >= 0; h--) {              /* Do 4 pixels at a time */
                         dstpixel = (LPWORD) (bmpImage->data + h * bmpImage->bytes_per_line + left*2);
                         for (x = 0; x < dstwidth/4; x++) {
                             *dstpixel++ = (WORD)((((val = *ptr++) >> 3) & 0x1f) | ((val >> 6) & 0x03e0) | ((val >> 9) & 0x7c00));
@@ -1806,7 +1806,7 @@
                             *dstpixel++ = (WORD)(((val >> 19) & 0x1f) | ((val >> 22) & 0x03e0) | (((val = *ptr++) << 7) & 0x7c00));
                             *dstpixel++ = (WORD)(((val >> 11) & 0x1f) | ((val >> 14) & 0x03e0) | ((val >> 17) & 0x7c00));
                         }
-                        for (bits = (LPBYTE)ptr, divk=div; divk > 0; divk--, bits+=3)  //dstwidth not divisible by 4?
+                        for (bits = (LPBYTE)ptr, divk=div; divk > 0; divk--, bits+=3)  /* dstwidth not divisible by 4? */
                             *dstpixel++ = (((WORD)bits[2] << 7) & 0x07c00) |
                                             (((WORD)bits[1] << 2) & 0x03e0) |
                                             (((WORD)bits[0] >> 3) & 0x001f);
@@ -1826,9 +1826,9 @@
                 int div = dstwidth % 4;
                 int divk;
 
-                if( bmpImage->blue_mask == 0x001f && bmpImage->red_mask == 0xf800 )    // BGR888 to BGR565
+                if( bmpImage->blue_mask == 0x001f && bmpImage->red_mask == 0xf800 )    /* BGR888 to BGR565 */
                 {
-                    for (h = lines - 1; h >= 0; h--) {              //Do 4 pixels at a time
+		    for (h = lines - 1; h >= 0; h--) {              /* Do 4 pixels at a time */
                         dstpixel = (LPWORD) (bmpImage->data + h * bmpImage->bytes_per_line + left*2);
                         for (x = 0; x < dstwidth/4; x++) {
                             *dstpixel++ = (WORD)((((val = *ptr++) >> 3) & 0x1f) | ((val >> 5) & 0x07e0) | ((val >> 8) & 0xf800));
@@ -1836,16 +1836,16 @@
                             *dstpixel++ = (WORD)(((val >> 19) & 0x1f) | ((val >> 21) & 0x07e0) | (((val = *ptr++) << 8) & 0xf800));
                             *dstpixel++ = (WORD)(((val >> 11) & 0x1f) | ((val >> 13) & 0x07e0) | ((val >> 16) & 0xf800));
                         }
-                        for (   bits = (LPBYTE)ptr, divk=div; divk > 0; divk--, bits+=3)  //dstwidth is not divisible by 4?
+                        for (   bits = (LPBYTE)ptr, divk=div; divk > 0; divk--, bits+=3)  /* dstwidth is not divisible by 4? */
                             *dstpixel++ = (((WORD)bits[2] << 8) & 0xf800) |
                                             (((WORD)bits[1] << 3) & 0x07e0) |
                                             (((WORD)bits[0] >> 3) & 0x001f);
                         ptr = (DWORD *)((srcbits += linebytes) + left * 3);
                     }
                 }
-                else if( bmpImage->blue_mask == 0xf800 && bmpImage->red_mask == 0x001f ) // BGR888 to RGB565
+                else if( bmpImage->blue_mask == 0xf800 && bmpImage->red_mask == 0x001f ) /* BGR888 to RGB565 */
                 {
-                    for (h = lines - 1; h >= 0; h--) {              //Do 4 pixels at a time
+		    for (h = lines - 1; h >= 0; h--) {              /* Do 4 pixels at a time */
                         dstpixel = (LPWORD) (bmpImage->data + h * bmpImage->bytes_per_line + left*2);
                         for (x = 0; x < dstwidth/4; x++) {
                             *dstpixel++ = (WORD)((((val = *ptr++) << 8) & 0xf800) | ((val >> 5) & 0x07e0) | ((val >> 19) & 0x1f));
@@ -1853,7 +1853,7 @@
                             *dstpixel++ = (WORD)(((val >> 8) & 0xf800) | ((val >> 21) & 0x07e0) | (((val = *ptr++) >> 3) & 0x1f));
                             *dstpixel++ = (WORD)((val & 0xf800) | ((val >> 13) & 0x07e0) | ((val >> 27) & 0x1f));
                         }
-                        for (   bits = (LPBYTE)ptr, divk=div; divk > 0; divk--, bits+=3)  //dstwidth is not divisible by 4?
+                        for (   bits = (LPBYTE)ptr, divk=div; divk > 0; divk--, bits+=3)  /* dstwidth is not divisible by 4? */
                             *dstpixel++ = (((WORD)bits[0] << 8) & 0xf800) |
                                             (((WORD)bits[1] << 3) & 0x07e0) |
                                             (((WORD)bits[2] >> 3) & 0x001f);
diff --git a/if1632/builtin.c b/if1632/builtin.c
index e2fade8..c123dc2 100644
--- a/if1632/builtin.c
+++ b/if1632/builtin.c
@@ -92,7 +92,7 @@
         memcpy( (LPBYTE)pModule, descr->module_start, res_off );
         memcpy( (LPBYTE)pModule + res_off, rsrc->res_start, rsrc->res_size );
         memcpy( (LPBYTE)pModule + res_off + rsrc->res_size, 
-                descr->module_start + res_off, descr->module_size - res_off );
+                (LPBYTE)descr->module_start + res_off, descr->module_size - res_off );
 
         /* Have to fix up various pModule-based near pointers.  Ugh! */
         pModule->name_table   += rsrc->res_size;
diff --git a/include/dplobby.h b/include/dplobby.h
index 002e4f7..0bb97fd 100644
--- a/include/dplobby.h
+++ b/include/dplobby.h
@@ -244,19 +244,19 @@
 /* Used for specification of a communication port. Baud rate, stop bits and
  * parity bits can be found in winbase.h. These are flow control constants only. 
  */
-#define DPCPA_NOFLOW        0           // no flow control
-#define DPCPA_XONXOFFFLOW   1           // software flow control
-#define DPCPA_RTSFLOW       2           // hardware flow control with RTS
-#define DPCPA_DTRFLOW       3           // hardware flow control with DTR
-#define DPCPA_RTSDTRFLOW    4           // hardware flow control with RTS and DTR
+#define DPCPA_NOFLOW        0           /* no flow control */
+#define DPCPA_XONXOFFFLOW   1           /* software flow control */
+#define DPCPA_RTSFLOW       2           /* hardware flow control with RTS */
+#define DPCPA_DTRFLOW       3           /* hardware flow control with DTR */
+#define DPCPA_RTSDTRFLOW    4           /* hardware flow control with RTS and DTR */
 
 typedef struct tagDPCOMPORTADDRESS
 {
-    DWORD   dwComPort;                  // COM port to use (1-4)
-    DWORD   dwBaudRate;                 // baud rate (100-256k)
-    DWORD   dwStopBits;                 // no. stop bits (1-2)
-    DWORD   dwParity;                   // parity (none, odd, even, mark)
-    DWORD   dwFlowControl;              // flow control (none, xon/xoff, rts, dtr)
+    DWORD   dwComPort;                  /* COM port to use (1-4) */
+    DWORD   dwBaudRate;                 /* baud rate (100-256k) */
+    DWORD   dwStopBits;                 /* no. stop bits (1-2) */
+    DWORD   dwParity;                   /* parity (none, odd, even, mark) */
+    DWORD   dwFlowControl;              /* flow control (none, xon/xoff, rts, dtr) */
 } DPCOMPORTADDRESS, *LPDPCOMPORTADDRESS;
 
 
diff --git a/include/wine/windef16.h b/include/wine/windef16.h
index 156ecca..d1935de 100644
--- a/include/wine/windef16.h
+++ b/include/wine/windef16.h
@@ -24,7 +24,7 @@
 	typedef HANDLE16 a##16; \
 	typedef a##16 *P##a##16; \
 	typedef a##16 *NP##a##16; \
-	typedef a##16 *LP##a##16; 
+	typedef a##16 *LP##a##16 
 
 DECLARE_HANDLE16(HACMDRIVERID);
 DECLARE_HANDLE16(HACMDRIVER);
diff --git a/include/wingdi.h b/include/wingdi.h
index e17c5d5..6aac1ff 100644
--- a/include/wingdi.h
+++ b/include/wingdi.h
@@ -3038,9 +3038,9 @@
     WCHAR	DeviceString[128];
     DWORD	StateFlags;
 } DISPLAY_DEVICEW,*PDISPLAY_DEVICEW,*LPDISPLAY_DEVICEW;      
-DECL_WINELIB_TYPE_AW(DISPLAY_DEVICE);
-DECL_WINELIB_TYPE_AW(PDISPLAY_DEVICE);
-DECL_WINELIB_TYPE_AW(LPDISPLAY_DEVICE);
+DECL_WINELIB_TYPE_AW(DISPLAY_DEVICE)
+DECL_WINELIB_TYPE_AW(PDISPLAY_DEVICE)
+DECL_WINELIB_TYPE_AW(LPDISPLAY_DEVICE)
 
 /* DISPLAY_DEVICE.StateFlags (?)*/
 #define	DISPLAY_DEVICE_ATTACHED_TO_DESKTOP	0x00000001
diff --git a/loader/ne/resource.c b/loader/ne/resource.c
index 1bfcf45..d3be919 100644
--- a/loader/ne/resource.c
+++ b/loader/ne/resource.c
@@ -203,7 +203,7 @@
         {
             /* NOTE: hRsrcMap points to start of built-in resource data */
             memcpy( GlobalLock16( handle ), 
-                    pModule->hRsrcMap + (pNameInfo->offset << sizeShift),
+                    (char *)pModule->hRsrcMap + (pNameInfo->offset << sizeShift),
                     pNameInfo->length << sizeShift );
         }
 	return handle;
diff --git a/misc/registry.c b/misc/registry.c
index 5533a14..9bfcfe8 100644
--- a/misc/registry.c
+++ b/misc/registry.c
@@ -1290,7 +1290,7 @@
 	      regf = base;
 
 	      /* hbin block */
-	      hbin = base + 0x1000;
+	      hbin = (char *) base + 0x1000;
 	      if (hbin->id != NT_REG_POOL_BLOCK_ID)
 	      {
 	        ERR_(reg)( "%s hbin block invalid\n", fn);
@@ -1313,7 +1313,7 @@
 	        goto error1;
 	      }
 
-	      ret = _nt_parse_nk (hkey, base+0x1000, nk, level);
+	      ret = _nt_parse_nk (hkey, (char *) base + 0x1000, nk, level);
 	    }
 	    break;
 	  default:
diff --git a/objects/dib.c b/objects/dib.c
index fd8347e..9afe1fd 100644
--- a/objects/dib.c
+++ b/objects/dib.c
@@ -541,7 +541,7 @@
             /*FIXME: Only RGB dibs supported for now */
             int srcwidth = bmp->dib->dsBm.bmWidth, srcwidthb = bmp->dib->dsBm.bmWidthBytes;
             int dstwidthb = DIB_GetDIBWidthBytes( info->bmiHeader.biWidth, info->bmiHeader.biBitCount );
-            LPBYTE dbits = bits, sbits = bmp->dib->dsBm.bmBits + (startscan * srcwidthb);
+            LPBYTE dbits = bits, sbits = (LPBYTE) bmp->dib->dsBm.bmBits + (startscan * srcwidthb);
             int x, y;
 
             if ((info->bmiHeader.biHeight < 0) ^ (bmp->dib->dsBmih.biHeight < 0))
diff --git a/ole/ole2nls.c b/ole/ole2nls.c
index 2535839..29fe249 100644
--- a/ole/ole2nls.c
+++ b/ole/ole2nls.c
@@ -3407,7 +3407,7 @@
 			}
 
 			for (i=1;*sptr=='0' ;i++, sptr++) ; /* Ignore leading zeros from source*/
-				if (intsize==0 && (decsize==0 || thisleadingzero)) // Insert one leading zero into destination if required
+				if (intsize==0 && (decsize==0 || thisleadingzero)) /* Insert one leading zero into destination if required */
 					*(dptr++)=digits_buf[0];
 				for (i=1;i<=intsize;i++) {
 
diff --git a/programs/clock/winclock.c b/programs/clock/winclock.c
index 9578966..6aa8464 100644
--- a/programs/clock/winclock.c
+++ b/programs/clock/winclock.c
@@ -24,6 +24,7 @@
  */
 
 #include <math.h>
+#include <stdlib.h>
 #include <string.h>
 #include "winclock.h"
 #include "windows.h"
diff --git a/scheduler/process.c b/scheduler/process.c
index 0adb25c..56167a6 100644
--- a/scheduler/process.c
+++ b/scheduler/process.c
@@ -1171,7 +1171,7 @@
         req->addr = (char *)addr + pos;
         req->len = (max + sizeof(int) - 1) / sizeof(int);
         req->first_mask = ~0;
-        memcpy( req->data, buffer + pos, max );
+        memcpy( req->data, (char *) buffer + pos, max );
         if (server_call( REQ_WRITE_PROCESS_MEMORY )) goto error;
         pos += max;
         size -= max;
diff --git a/tools/bin2res.c b/tools/bin2res.c
index 0218f24..ed27db2 100644
--- a/tools/bin2res.c
+++ b/tools/bin2res.c
@@ -264,7 +264,7 @@
 	    {
 	      printf("[%s:s]", outfile);
 	    }
-end_of_resource:	    
+end_of_resource: ;
 	  }
 	}