gcc 4.0 warning fixes.

diff --git a/dlls/oleaut32/safearray.c b/dlls/oleaut32/safearray.c
index e984895..b84226b 100644
--- a/dlls/oleaut32/safearray.c
+++ b/dlls/oleaut32/safearray.c
@@ -789,12 +789,12 @@
   if (!psa)
     return E_INVALIDARG;
 
-  ulLocks = InterlockedIncrement(&psa->cLocks);
+  ulLocks = InterlockedIncrement( (LONG*) &psa->cLocks);
 
   if (ulLocks > 0xffff) /* Maximum of 16384 locks at a time */
   {
     WARN("Out of locks!\n");
-    InterlockedDecrement(&psa->cLocks);
+    InterlockedDecrement( (LONG*) &psa->cLocks);
     return E_UNEXPECTED;
   }
   return S_OK;
@@ -823,10 +823,10 @@
   if (!psa)
     return E_INVALIDARG;
 
-  if ((LONG)InterlockedDecrement(&psa->cLocks) < 0)
+  if ((LONG)InterlockedDecrement( (LONG*) &psa->cLocks) < 0)
   {
     WARN("Unlocked but no lock held!\n");
-    InterlockedIncrement(&psa->cLocks);
+    InterlockedIncrement( (LONG*) &psa->cLocks);
     return E_UNEXPECTED;
   }
   return S_OK;
diff --git a/dlls/oleaut32/tmarshal.c b/dlls/oleaut32/tmarshal.c
index 720dc74..dc51e33 100644
--- a/dlls/oleaut32/tmarshal.c
+++ b/dlls/oleaut32/tmarshal.c
@@ -556,7 +556,7 @@
 	    if (hres) return hres;
 	}
 	/* need to recurse since we need to free the stuff */
-	hres = serialize_param(tinfo,writeit,debugout,dealloc,&tdesc2,&(V_I4(vt)),buf);
+	hres = serialize_param(tinfo,writeit,debugout,dealloc,&tdesc2,(DWORD*)&(V_I4(vt)),buf);
 	if (debugout) TRACE_(olerelay)(")");
 	return hres;
     }
@@ -1077,7 +1077,7 @@
 		tdesc2.vt = vttype;
 		V_VT(vt)  = vttype;
 	        if (debugout) TRACE_(olerelay)("Vt(%ld)(",vttype);
-		hres = deserialize_param(tinfo, readit, debugout, alloc, &tdesc2, &(V_I4(vt)), buf);
+		hres = deserialize_param(tinfo, readit, debugout, alloc, &tdesc2, (DWORD*)&(V_I4(vt)), buf);
 		TRACE_(olerelay)(")");
 		return hres;
 	    } else {
@@ -1526,7 +1526,7 @@
     ULONG		status;
     BSTR		fname,iname;
     BSTR		names[10];
-    int			nrofnames;
+    UINT		nrofnames;
     int			is_idispatch_getidsofnames = 0;
     DWORD		remoteresult = 0;
     ITypeInfo 		*tinfo;
@@ -2016,7 +2016,7 @@
     HRESULT	hres;
     DWORD	*args, res, *xargs, nrofargs;
     marshal_state	buf;
-    int		nrofnames;
+    UINT	nrofnames;
     BSTR	names[10];
     BSTR	fname = NULL,iname = NULL;
     BOOL	is_idispatch_getidsofnames = 0;
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 8f4a3fb..d7de870 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -247,7 +247,7 @@
 
     while (hr != S_OK)
     {
-        DWORD dwPathLen = sizeof(Path);
+        LONG dwPathLen = sizeof(Path);
 
         get_lcid_subkey( myLCID, SYS_WIN32, buffer );
 
@@ -5215,7 +5215,7 @@
             ITypeLib *pTLib = NULL;
 
 	    if(pRefType->pImpTLInfo == TLB_REF_INTERNAL) {
-	        int Index;
+	        UINT Index;
 		result = ITypeInfo_GetContainingTypeLib(iface, &pTLib, &Index);
 	    } else {
 	        if(pRefType->pImpTLInfo->pImpTypeLib) {
diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c
index 8818d60..7b4c670 100644
--- a/dlls/oleaut32/typelib2.c
+++ b/dlls/oleaut32/typelib2.c
@@ -1332,7 +1332,7 @@
     ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface;
 
     ITypeLib *container;
-    int index;
+    UINT index;
     HRESULT res;
 
     TRACE("(%p,%p,%p)\n", iface, pTInfo, phRefType);