oleaut32: Avoid signed-unsigned integer comparisons.

This commit is contained in:
Andrew Talbot 2013-02-21 22:30:17 +00:00 committed by Alexandre Julliard
parent b9fe178f36
commit eedf2f6fab
4 changed files with 17 additions and 10 deletions

View File

@ -1420,8 +1420,8 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface, IStream *pStm)
} while (!headerisdata);
if (statfailed) { /* we don't know the size ... read all we get */
int sizeinc = 4096;
int origsize = sizeinc;
unsigned int sizeinc = 4096;
unsigned int origsize = sizeinc;
ULONG nread = 42;
TRACE("Reading all data from stream.\n");

View File

@ -168,7 +168,7 @@ HRESULT WINAPI OleCreatePropertyFrameIndirect(LPOCPFIPARAMS lpParams)
IPropertyPage **property_page;
PropertyPageSite *property_page_site;
HRESULT res;
int i;
ULONG i;
HMODULE hcomctl;
HRSRC property_sheet_dialog_find = NULL;
HGLOBAL property_sheet_dialog_load = NULL;

View File

@ -4388,7 +4388,7 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfoOfGuid(
ITypeInfo **ppTInfo)
{
ITypeLibImpl *This = impl_from_ITypeLib2(iface);
UINT i;
int i;
TRACE("%p %s %p\n", This, debugstr_guid(guid), ppTInfo);
@ -4553,7 +4553,8 @@ static HRESULT WINAPI ITypeLib2_fnIsName(
BOOL *pfName)
{
ITypeLibImpl *This = impl_from_ITypeLib2(iface);
UINT nNameBufLen = (lstrlenW(szNameBuf)+1)*sizeof(WCHAR), tic, fdc, vrc, pc;
int tic;
UINT nNameBufLen = (lstrlenW(szNameBuf)+1)*sizeof(WCHAR), fdc, vrc;
TRACE("(%p)->(%s,%08x,%p)\n", This, debugstr_w(szNameBuf), lHashVal,
pfName);
@ -4564,6 +4565,8 @@ static HRESULT WINAPI ITypeLib2_fnIsName(
if(!memcmp(szNameBuf,pTInfo->Name, nNameBufLen)) goto ITypeLib2_fnIsName_exit;
for(fdc = 0; fdc < pTInfo->TypeAttr.cFuncs; ++fdc) {
TLBFuncDesc *pFInfo = &pTInfo->funcdescs[fdc];
int pc;
if(!memcmp(szNameBuf,pFInfo->Name, nNameBufLen)) goto ITypeLib2_fnIsName_exit;
for(pc=0; pc < pFInfo->funcdesc.cParams; pc++)
if(!memcmp(szNameBuf,pFInfo->pParamDesc[pc].Name, nNameBufLen))
@ -4599,7 +4602,8 @@ static HRESULT WINAPI ITypeLib2_fnFindName(
UINT16 *found)
{
ITypeLibImpl *This = impl_from_ITypeLib2(iface);
UINT tic, count = 0;
int tic;
UINT count = 0;
UINT len;
TRACE("(%p)->(%s %u %p %p %p)\n", This, debugstr_w(name), hash, ppTInfo, memid, found);
@ -4616,7 +4620,7 @@ static HRESULT WINAPI ITypeLib2_fnFindName(
if(!memcmp(name, pTInfo->Name, len)) goto ITypeLib2_fnFindName_exit;
for(fdc = 0; fdc < pTInfo->TypeAttr.cFuncs; ++fdc) {
TLBFuncDesc *func = &pTInfo->funcdescs[fdc];
UINT pc;
int pc;
if(!memcmp(name, func->Name, len)) goto ITypeLib2_fnFindName_exit;
for(pc = 0; pc < func->funcdesc.cParams; pc++) {
@ -4995,7 +4999,7 @@ static HRESULT WINAPI ITypeLibComp_fnBindType(
ITypeComp ** ppTComp)
{
ITypeLibImpl *This = impl_from_ITypeComp(iface);
UINT i;
int i;
TRACE("(%s, %x, %p, %p)\n", debugstr_w(szName), lHash, ppTInfo, ppTComp);
@ -5097,7 +5101,7 @@ static ULONG WINAPI ITypeInfo_fnAddRef( ITypeInfo2 *iface)
static void ITypeInfoImpl_Destroy(ITypeInfoImpl *This)
{
UINT i, j;
UINT i;
TRACE("destroying ITypeInfo(%p)\n",This);
@ -5112,6 +5116,7 @@ static void ITypeInfoImpl_Destroy(ITypeInfoImpl *This)
for (i = 0; i < This->TypeAttr.cFuncs; ++i)
{
int j;
TLBFuncDesc *pFInfo = &This->funcdescs[i];
for(j = 0; j < pFInfo->funcdesc.cParams; j++)
{

View File

@ -2050,8 +2050,10 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc(
if(This->dual)
This->dual->typedata = This->typedata;
} else {
unsigned int j;
iter = This->typedata->next;
for(i=0; i<index; i++)
for (j = 0; j < index; j++)
iter = iter->next;
insert->next = iter->next;