From 5af3af2b2f7227a05b61b17b76540cac73f7cad7 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Sun, 2 Nov 2008 18:46:53 +0000 Subject: [PATCH] oleaut32: Sign-compare warnings fix. --- dlls/oleaut32/recinfo.c | 3 +-- dlls/oleaut32/safearray.c | 2 +- dlls/oleaut32/typelib.c | 47 ++++++++++++++++++++------------------- dlls/oleaut32/typelib2.c | 2 +- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/dlls/oleaut32/recinfo.c b/dlls/oleaut32/recinfo.c index a4da4d374fb..8fdf85aed12 100644 --- a/dlls/oleaut32/recinfo.c +++ b/dlls/oleaut32/recinfo.c @@ -412,8 +412,7 @@ static HRESULT WINAPI IRecordInfoImpl_GetFieldNames(IRecordInfo *iface, ULONG *p BSTR *rgBstrNames) { IRecordInfoImpl *This = (IRecordInfoImpl*)iface; - ULONG n = This->n_vars; - int i; + ULONG n = This->n_vars, i; TRACE("(%p)->(%p %p)\n", This, pcNames, rgBstrNames); diff --git a/dlls/oleaut32/safearray.c b/dlls/oleaut32/safearray.c index bf82a5abcd9..c717ac6608a 100644 --- a/dlls/oleaut32/safearray.c +++ b/dlls/oleaut32/safearray.c @@ -207,7 +207,7 @@ static void SAFEARRAY_SetFeatures(VARTYPE vt, SAFEARRAY *psa) static SAFEARRAY* SAFEARRAY_Create(VARTYPE vt, UINT cDims, const SAFEARRAYBOUND *rgsabound, ULONG ulSize) { SAFEARRAY *psa = NULL; - int i; + unsigned int i; if (!rgsabound) return NULL; diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 7e069d60050..f807c053683 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -1294,7 +1294,7 @@ static void dump_Variant(const VARIANT * pvar) static void dump_DispParms(const DISPPARAMS * pdp) { - int index; + unsigned int index; TRACE("args=%u named args=%u\n", pdp->cArgs, pdp->cNamedArgs); @@ -2973,7 +2973,7 @@ static WORD *SLTG_DoElem(WORD *pType, char *pBlk, static sltg_ref_lookup_t *SLTG_DoRefs(SLTG_RefInfo *pRef, ITypeLibImpl *pTL, char *pNameTable) { - int ref; + unsigned int ref; char *name; TLBRefType *ref_type; sltg_ref_lookup_t *table; @@ -3904,7 +3904,7 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfo( UINT index, ITypeInfo **ppTInfo) { - int i; + UINT i; ITypeLibImpl *This = (ITypeLibImpl *)iface; ITypeInfoImpl *pTypeInfo = This->pTypeInfo; @@ -3942,9 +3942,9 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfoType( TYPEKIND *pTKind) { ITypeLibImpl *This = (ITypeLibImpl *)iface; - int i; + UINT i; ITypeInfoImpl *pTInfo = This->pTypeInfo; - + if (ITypeLib2_fnGetTypeInfoCount(iface) < index + 1) return TYPE_E_ELEMENTNOTFOUND; @@ -4678,7 +4678,7 @@ static ULONG WINAPI ITypeInfo_fnRelease(ITypeInfo2 *iface) for (pFInfo = This->funclist; pFInfo; pFInfo = pFInfoNext) { - UINT i; + INT i; for(i = 0;i < pFInfo->funcdesc.cParams; i++) { ELEMDESC *elemdesc = &pFInfo->funcdesc.lprgelemdescParam[i]; @@ -4913,7 +4913,7 @@ HRESULT ITypeInfoImpl_GetInternalFuncDesc( ITypeInfo *iface, UINT index, const F { ITypeInfoImpl *This = (ITypeInfoImpl *)iface; const TLBFuncDesc *pFDesc; - int i; + UINT i; for(i=0, pFDesc=This->funclist; i!=index && pFDesc; i++, pFDesc=pFDesc->next) ; @@ -5106,7 +5106,7 @@ static HRESULT WINAPI ITypeInfo_fnGetVarDesc( ITypeInfo2 *iface, UINT index, LPVARDESC *ppVarDesc) { ITypeInfoImpl *This = (ITypeInfoImpl *)iface; - int i; + UINT i; const TLBVarDesc *pVDesc; TRACE("(%p) index %d\n", This, index); @@ -5198,7 +5198,7 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeOfImplType( HREFTYPE *pRefType) { ITypeInfoImpl *This = (ITypeInfoImpl *)iface; - int i; + UINT i; HRESULT hr = S_OK; const TLBImplType *pImpl = This->impltypelist; @@ -5261,7 +5261,7 @@ static HRESULT WINAPI ITypeInfo_fnGetImplTypeFlags( ITypeInfo2 *iface, UINT index, INT *pImplTypeFlags) { ITypeInfoImpl *This = (ITypeInfoImpl *)iface; - int i; + UINT i; TLBImplType *pImpl; TRACE("(%p) index %d\n", This, index); @@ -5287,7 +5287,7 @@ static HRESULT WINAPI ITypeInfo_fnGetIDsOfNames( ITypeInfo2 *iface, const TLBFuncDesc *pFDesc; const TLBVarDesc *pVDesc; HRESULT ret=S_OK; - int i; + UINT i; TRACE("(%p) Name %s cNames %d\n", This, debugstr_w(*rgszNames), cNames); @@ -5663,7 +5663,8 @@ DispCallFunc( void* pvInstance, ULONG_PTR oVft, CALLCONV cc, VARTYPE vtReturn, UINT cActuals, VARTYPE* prgvt, VARIANTARG** prgpvarg, VARIANT* pvargResult) { - int i, argsize, argspos; + int argsize, argspos; + UINT i; DWORD *args; HRESULT hres; @@ -5677,7 +5678,7 @@ DispCallFunc( for (i=0;ifunclist; i!=index && pFDesc; i++, pFDesc=pFDesc->next); @@ -6834,7 +6835,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetParamCustData( ITypeInfoImpl *This = (ITypeInfoImpl *)iface; TLBCustData *pCData=NULL; TLBFuncDesc * pFDesc; - int i; + UINT i; for(i=0, pFDesc=This->funclist; i!=indexFunc && pFDesc; i++,pFDesc=pFDesc->next); @@ -6867,7 +6868,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetVarCustData( ITypeInfoImpl *This = (ITypeInfoImpl *)iface; TLBCustData *pCData=NULL; TLBVarDesc * pVDesc; - int i; + UINT i; for(i=0, pVDesc=This->varlist; i!=index && pVDesc; i++, pVDesc=pVDesc->next); @@ -6903,7 +6904,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetImplTypeCustData( ITypeInfoImpl *This = (ITypeInfoImpl *)iface; TLBCustData *pCData=NULL; TLBImplType * pRDesc; - int i; + UINT i; for(i=0, pRDesc=This->impltypelist; i!=index && pRDesc; i++, pRDesc=pRDesc->next); @@ -7030,7 +7031,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllFuncCustData( ITypeInfoImpl *This = (ITypeInfoImpl *)iface; TLBCustData *pCData; TLBFuncDesc * pFDesc; - int i; + UINT i; TRACE("(%p) index %d\n", This, index); for(i=0, pFDesc=This->funclist; i!=index && pFDesc; i++, pFDesc=pFDesc->next) @@ -7066,7 +7067,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllParamCustData( ITypeInfo2 * iface, ITypeInfoImpl *This = (ITypeInfoImpl *)iface; TLBCustData *pCData=NULL; TLBFuncDesc * pFDesc; - int i; + UINT i; TRACE("(%p) index %d\n", This, indexFunc); for(i=0, pFDesc=This->funclist; i!=indexFunc && pFDesc; i++, pFDesc=pFDesc->next) @@ -7103,7 +7104,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllVarCustData( ITypeInfo2 * iface, ITypeInfoImpl *This = (ITypeInfoImpl *)iface; TLBCustData *pCData; TLBVarDesc * pVDesc; - int i; + UINT i; TRACE("(%p) index %d\n", This, index); for(i=0, pVDesc=This->varlist; i!=index && pVDesc; i++, pVDesc=pVDesc->next) @@ -7141,7 +7142,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllImplTypeCustData( ITypeInfoImpl *This = (ITypeInfoImpl *)iface; TLBCustData *pCData; TLBImplType * pRDesc; - int i; + UINT i; TRACE("(%p) index %d\n", This, index); for(i=0, pRDesc=This->impltypelist; i!=index && pRDesc; i++, pRDesc=pRDesc->next) @@ -7231,7 +7232,7 @@ HRESULT WINAPI CreateDispTypeInfo( { ITypeInfoImpl *pTIClass, *pTIIface; ITypeLibImpl *pTypeLibImpl; - int param, func; + unsigned int param, func; TLBFuncDesc **ppFuncDesc; TLBRefType *ref; diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c index 0d10f536525..3d092e50d89 100644 --- a/dlls/oleaut32/typelib2.c +++ b/dlls/oleaut32/typelib2.c @@ -1708,7 +1708,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncAndParamNames( { ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface; - int i; + UINT i; int offset; char *namedata;