From a04b77ddc23c516c4fde14a0b0c43d98fbf162c8 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Mon, 8 Aug 2005 18:38:29 +0000 Subject: [PATCH] gcc 4.0 warning fixes. --- dlls/oleaut32/safearray.c | 8 ++++---- dlls/oleaut32/tmarshal.c | 8 ++++---- dlls/oleaut32/typelib.c | 4 ++-- dlls/oleaut32/typelib2.c | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dlls/oleaut32/safearray.c b/dlls/oleaut32/safearray.c index e984895acaa..b84226b322c 100644 --- a/dlls/oleaut32/safearray.c +++ b/dlls/oleaut32/safearray.c @@ -789,12 +789,12 @@ HRESULT WINAPI SafeArrayLock(SAFEARRAY *psa) 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 @@ HRESULT WINAPI SafeArrayUnlock(SAFEARRAY *psa) 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 720dc740ef8..dc51e33876e 100644 --- a/dlls/oleaut32/tmarshal.c +++ b/dlls/oleaut32/tmarshal.c @@ -556,7 +556,7 @@ serialize_param( 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 @@ deserialize_param( 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 @@ xCall(LPVOID retptr, int method, TMProxyImpl *tpinfo /*, args */) 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 @@ TMStubImpl_Invoke( 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 8f4a3fb5604..d7de87006f6 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -247,7 +247,7 @@ HRESULT WINAPI QueryPathOfRegTypeLib( while (hr != S_OK) { - DWORD dwPathLen = sizeof(Path); + LONG dwPathLen = sizeof(Path); get_lcid_subkey( myLCID, SYS_WIN32, buffer ); @@ -5215,7 +5215,7 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeInfo( 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 8818d60aa43..7b4c670a836 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -1332,7 +1332,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddRefTypeInfo( ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface; ITypeLib *container; - int index; + UINT index; HRESULT res; TRACE("(%p,%p,%p)\n", iface, pTInfo, phRefType);