oleaut32: Sign-compare warnings fix.

This commit is contained in:
Andrew Talbot 2008-11-02 18:46:53 +00:00 committed by Alexandre Julliard
parent 2adcef7954
commit 5af3af2b2f
4 changed files with 27 additions and 27 deletions

View File

@ -412,8 +412,7 @@ static HRESULT WINAPI IRecordInfoImpl_GetFieldNames(IRecordInfo *iface, ULONG *p
BSTR *rgBstrNames) BSTR *rgBstrNames)
{ {
IRecordInfoImpl *This = (IRecordInfoImpl*)iface; IRecordInfoImpl *This = (IRecordInfoImpl*)iface;
ULONG n = This->n_vars; ULONG n = This->n_vars, i;
int i;
TRACE("(%p)->(%p %p)\n", This, pcNames, rgBstrNames); TRACE("(%p)->(%p %p)\n", This, pcNames, rgBstrNames);

View File

@ -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) static SAFEARRAY* SAFEARRAY_Create(VARTYPE vt, UINT cDims, const SAFEARRAYBOUND *rgsabound, ULONG ulSize)
{ {
SAFEARRAY *psa = NULL; SAFEARRAY *psa = NULL;
int i; unsigned int i;
if (!rgsabound) if (!rgsabound)
return NULL; return NULL;

View File

@ -1294,7 +1294,7 @@ static void dump_Variant(const VARIANT * pvar)
static void dump_DispParms(const DISPPARAMS * pdp) static void dump_DispParms(const DISPPARAMS * pdp)
{ {
int index; unsigned int index;
TRACE("args=%u named args=%u\n", pdp->cArgs, pdp->cNamedArgs); 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, static sltg_ref_lookup_t *SLTG_DoRefs(SLTG_RefInfo *pRef, ITypeLibImpl *pTL,
char *pNameTable) char *pNameTable)
{ {
int ref; unsigned int ref;
char *name; char *name;
TLBRefType *ref_type; TLBRefType *ref_type;
sltg_ref_lookup_t *table; sltg_ref_lookup_t *table;
@ -3904,7 +3904,7 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfo(
UINT index, UINT index,
ITypeInfo **ppTInfo) ITypeInfo **ppTInfo)
{ {
int i; UINT i;
ITypeLibImpl *This = (ITypeLibImpl *)iface; ITypeLibImpl *This = (ITypeLibImpl *)iface;
ITypeInfoImpl *pTypeInfo = This->pTypeInfo; ITypeInfoImpl *pTypeInfo = This->pTypeInfo;
@ -3942,9 +3942,9 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfoType(
TYPEKIND *pTKind) TYPEKIND *pTKind)
{ {
ITypeLibImpl *This = (ITypeLibImpl *)iface; ITypeLibImpl *This = (ITypeLibImpl *)iface;
int i; UINT i;
ITypeInfoImpl *pTInfo = This->pTypeInfo; ITypeInfoImpl *pTInfo = This->pTypeInfo;
if (ITypeLib2_fnGetTypeInfoCount(iface) < index + 1) if (ITypeLib2_fnGetTypeInfoCount(iface) < index + 1)
return TYPE_E_ELEMENTNOTFOUND; return TYPE_E_ELEMENTNOTFOUND;
@ -4678,7 +4678,7 @@ static ULONG WINAPI ITypeInfo_fnRelease(ITypeInfo2 *iface)
for (pFInfo = This->funclist; pFInfo; pFInfo = pFInfoNext) for (pFInfo = This->funclist; pFInfo; pFInfo = pFInfoNext)
{ {
UINT i; INT i;
for(i = 0;i < pFInfo->funcdesc.cParams; i++) for(i = 0;i < pFInfo->funcdesc.cParams; i++)
{ {
ELEMDESC *elemdesc = &pFInfo->funcdesc.lprgelemdescParam[i]; ELEMDESC *elemdesc = &pFInfo->funcdesc.lprgelemdescParam[i];
@ -4913,7 +4913,7 @@ HRESULT ITypeInfoImpl_GetInternalFuncDesc( ITypeInfo *iface, UINT index, const F
{ {
ITypeInfoImpl *This = (ITypeInfoImpl *)iface; ITypeInfoImpl *This = (ITypeInfoImpl *)iface;
const TLBFuncDesc *pFDesc; const TLBFuncDesc *pFDesc;
int i; UINT i;
for(i=0, pFDesc=This->funclist; i!=index && pFDesc; i++, pFDesc=pFDesc->next) 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) LPVARDESC *ppVarDesc)
{ {
ITypeInfoImpl *This = (ITypeInfoImpl *)iface; ITypeInfoImpl *This = (ITypeInfoImpl *)iface;
int i; UINT i;
const TLBVarDesc *pVDesc; const TLBVarDesc *pVDesc;
TRACE("(%p) index %d\n", This, index); TRACE("(%p) index %d\n", This, index);
@ -5198,7 +5198,7 @@ static HRESULT WINAPI ITypeInfo_fnGetRefTypeOfImplType(
HREFTYPE *pRefType) HREFTYPE *pRefType)
{ {
ITypeInfoImpl *This = (ITypeInfoImpl *)iface; ITypeInfoImpl *This = (ITypeInfoImpl *)iface;
int i; UINT i;
HRESULT hr = S_OK; HRESULT hr = S_OK;
const TLBImplType *pImpl = This->impltypelist; const TLBImplType *pImpl = This->impltypelist;
@ -5261,7 +5261,7 @@ static HRESULT WINAPI ITypeInfo_fnGetImplTypeFlags( ITypeInfo2 *iface,
UINT index, INT *pImplTypeFlags) UINT index, INT *pImplTypeFlags)
{ {
ITypeInfoImpl *This = (ITypeInfoImpl *)iface; ITypeInfoImpl *This = (ITypeInfoImpl *)iface;
int i; UINT i;
TLBImplType *pImpl; TLBImplType *pImpl;
TRACE("(%p) index %d\n", This, index); TRACE("(%p) index %d\n", This, index);
@ -5287,7 +5287,7 @@ static HRESULT WINAPI ITypeInfo_fnGetIDsOfNames( ITypeInfo2 *iface,
const TLBFuncDesc *pFDesc; const TLBFuncDesc *pFDesc;
const TLBVarDesc *pVDesc; const TLBVarDesc *pVDesc;
HRESULT ret=S_OK; HRESULT ret=S_OK;
int i; UINT i;
TRACE("(%p) Name %s cNames %d\n", This, debugstr_w(*rgszNames), TRACE("(%p) Name %s cNames %d\n", This, debugstr_w(*rgszNames),
cNames); cNames);
@ -5663,7 +5663,8 @@ DispCallFunc(
void* pvInstance, ULONG_PTR oVft, CALLCONV cc, VARTYPE vtReturn, UINT cActuals, void* pvInstance, ULONG_PTR oVft, CALLCONV cc, VARTYPE vtReturn, UINT cActuals,
VARTYPE* prgvt, VARIANTARG** prgpvarg, VARIANT* pvargResult) VARTYPE* prgvt, VARIANTARG** prgpvarg, VARIANT* pvargResult)
{ {
int i, argsize, argspos; int argsize, argspos;
UINT i;
DWORD *args; DWORD *args;
HRESULT hres; HRESULT hres;
@ -5677,7 +5678,7 @@ DispCallFunc(
for (i=0;i<cActuals;i++) for (i=0;i<cActuals;i++)
{ {
TRACE("arg %d: type %d, size %d\n",i,prgvt[i],_dispargsize(prgvt[i])); TRACE("arg %u: type %d, size %d\n",i,prgvt[i],_dispargsize(prgvt[i]));
dump_Variant(prgpvarg[i]); dump_Variant(prgpvarg[i]);
argsize += _dispargsize(prgvt[i]); argsize += _dispargsize(prgvt[i]);
} }
@ -5693,7 +5694,7 @@ DispCallFunc(
for (i=0;i<cActuals;i++) for (i=0;i<cActuals;i++)
{ {
VARIANT *arg = prgpvarg[i]; VARIANT *arg = prgpvarg[i];
TRACE("Storing arg %d (%d as %d)\n",i,V_VT(arg),prgvt[i]); TRACE("Storing arg %u (%d as %d)\n",i,V_VT(arg),prgvt[i]);
if (prgvt[i] == VT_VARIANT) if (prgvt[i] == VT_VARIANT)
memcpy(&args[argspos], arg, _dispargsize(prgvt[i]) * sizeof(DWORD)); memcpy(&args[argspos], arg, _dispargsize(prgvt[i]) * sizeof(DWORD));
else else
@ -6802,7 +6803,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetFuncCustData(
ITypeInfoImpl *This = (ITypeInfoImpl *)iface; ITypeInfoImpl *This = (ITypeInfoImpl *)iface;
TLBCustData *pCData=NULL; TLBCustData *pCData=NULL;
TLBFuncDesc * pFDesc; TLBFuncDesc * pFDesc;
int i; UINT i;
for(i=0, pFDesc=This->funclist; i!=index && pFDesc; i++, for(i=0, pFDesc=This->funclist; i!=index && pFDesc; i++,
pFDesc=pFDesc->next); pFDesc=pFDesc->next);
@ -6834,7 +6835,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetParamCustData(
ITypeInfoImpl *This = (ITypeInfoImpl *)iface; ITypeInfoImpl *This = (ITypeInfoImpl *)iface;
TLBCustData *pCData=NULL; TLBCustData *pCData=NULL;
TLBFuncDesc * pFDesc; TLBFuncDesc * pFDesc;
int i; UINT i;
for(i=0, pFDesc=This->funclist; i!=indexFunc && pFDesc; i++,pFDesc=pFDesc->next); 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; ITypeInfoImpl *This = (ITypeInfoImpl *)iface;
TLBCustData *pCData=NULL; TLBCustData *pCData=NULL;
TLBVarDesc * pVDesc; TLBVarDesc * pVDesc;
int i; UINT i;
for(i=0, pVDesc=This->varlist; i!=index && pVDesc; i++, pVDesc=pVDesc->next); 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; ITypeInfoImpl *This = (ITypeInfoImpl *)iface;
TLBCustData *pCData=NULL; TLBCustData *pCData=NULL;
TLBImplType * pRDesc; TLBImplType * pRDesc;
int i; UINT i;
for(i=0, pRDesc=This->impltypelist; i!=index && pRDesc; i++, pRDesc=pRDesc->next); 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; ITypeInfoImpl *This = (ITypeInfoImpl *)iface;
TLBCustData *pCData; TLBCustData *pCData;
TLBFuncDesc * pFDesc; TLBFuncDesc * pFDesc;
int i; UINT i;
TRACE("(%p) index %d\n", This, index); TRACE("(%p) index %d\n", This, index);
for(i=0, pFDesc=This->funclist; i!=index && pFDesc; i++, for(i=0, pFDesc=This->funclist; i!=index && pFDesc; i++,
pFDesc=pFDesc->next) pFDesc=pFDesc->next)
@ -7066,7 +7067,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllParamCustData( ITypeInfo2 * iface,
ITypeInfoImpl *This = (ITypeInfoImpl *)iface; ITypeInfoImpl *This = (ITypeInfoImpl *)iface;
TLBCustData *pCData=NULL; TLBCustData *pCData=NULL;
TLBFuncDesc * pFDesc; TLBFuncDesc * pFDesc;
int i; UINT i;
TRACE("(%p) index %d\n", This, indexFunc); TRACE("(%p) index %d\n", This, indexFunc);
for(i=0, pFDesc=This->funclist; i!=indexFunc && pFDesc; i++, for(i=0, pFDesc=This->funclist; i!=indexFunc && pFDesc; i++,
pFDesc=pFDesc->next) pFDesc=pFDesc->next)
@ -7103,7 +7104,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllVarCustData( ITypeInfo2 * iface,
ITypeInfoImpl *This = (ITypeInfoImpl *)iface; ITypeInfoImpl *This = (ITypeInfoImpl *)iface;
TLBCustData *pCData; TLBCustData *pCData;
TLBVarDesc * pVDesc; TLBVarDesc * pVDesc;
int i; UINT i;
TRACE("(%p) index %d\n", This, index); TRACE("(%p) index %d\n", This, index);
for(i=0, pVDesc=This->varlist; i!=index && pVDesc; i++, for(i=0, pVDesc=This->varlist; i!=index && pVDesc; i++,
pVDesc=pVDesc->next) pVDesc=pVDesc->next)
@ -7141,7 +7142,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetAllImplTypeCustData(
ITypeInfoImpl *This = (ITypeInfoImpl *)iface; ITypeInfoImpl *This = (ITypeInfoImpl *)iface;
TLBCustData *pCData; TLBCustData *pCData;
TLBImplType * pRDesc; TLBImplType * pRDesc;
int i; UINT i;
TRACE("(%p) index %d\n", This, index); TRACE("(%p) index %d\n", This, index);
for(i=0, pRDesc=This->impltypelist; i!=index && pRDesc; i++, for(i=0, pRDesc=This->impltypelist; i!=index && pRDesc; i++,
pRDesc=pRDesc->next) pRDesc=pRDesc->next)
@ -7231,7 +7232,7 @@ HRESULT WINAPI CreateDispTypeInfo(
{ {
ITypeInfoImpl *pTIClass, *pTIIface; ITypeInfoImpl *pTIClass, *pTIIface;
ITypeLibImpl *pTypeLibImpl; ITypeLibImpl *pTypeLibImpl;
int param, func; unsigned int param, func;
TLBFuncDesc **ppFuncDesc; TLBFuncDesc **ppFuncDesc;
TLBRefType *ref; TLBRefType *ref;

View File

@ -1708,7 +1708,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncAndParamNames(
{ {
ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface; ICreateTypeInfo2Impl *This = (ICreateTypeInfo2Impl *)iface;
int i; UINT i;
int offset; int offset;
char *namedata; char *namedata;