Commit eedf2f6f authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

oleaut32: Avoid signed-unsigned integer comparisons.

parent b9fe178f
...@@ -1420,8 +1420,8 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface, IStream *pStm) ...@@ -1420,8 +1420,8 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface, IStream *pStm)
} while (!headerisdata); } while (!headerisdata);
if (statfailed) { /* we don't know the size ... read all we get */ if (statfailed) { /* we don't know the size ... read all we get */
int sizeinc = 4096; unsigned int sizeinc = 4096;
int origsize = sizeinc; unsigned int origsize = sizeinc;
ULONG nread = 42; ULONG nread = 42;
TRACE("Reading all data from stream.\n"); TRACE("Reading all data from stream.\n");
......
...@@ -168,7 +168,7 @@ HRESULT WINAPI OleCreatePropertyFrameIndirect(LPOCPFIPARAMS lpParams) ...@@ -168,7 +168,7 @@ HRESULT WINAPI OleCreatePropertyFrameIndirect(LPOCPFIPARAMS lpParams)
IPropertyPage **property_page; IPropertyPage **property_page;
PropertyPageSite *property_page_site; PropertyPageSite *property_page_site;
HRESULT res; HRESULT res;
int i; ULONG i;
HMODULE hcomctl; HMODULE hcomctl;
HRSRC property_sheet_dialog_find = NULL; HRSRC property_sheet_dialog_find = NULL;
HGLOBAL property_sheet_dialog_load = NULL; HGLOBAL property_sheet_dialog_load = NULL;
......
...@@ -4388,7 +4388,7 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfoOfGuid( ...@@ -4388,7 +4388,7 @@ static HRESULT WINAPI ITypeLib2_fnGetTypeInfoOfGuid(
ITypeInfo **ppTInfo) ITypeInfo **ppTInfo)
{ {
ITypeLibImpl *This = impl_from_ITypeLib2(iface); ITypeLibImpl *This = impl_from_ITypeLib2(iface);
UINT i; int i;
TRACE("%p %s %p\n", This, debugstr_guid(guid), ppTInfo); TRACE("%p %s %p\n", This, debugstr_guid(guid), ppTInfo);
...@@ -4553,7 +4553,8 @@ static HRESULT WINAPI ITypeLib2_fnIsName( ...@@ -4553,7 +4553,8 @@ static HRESULT WINAPI ITypeLib2_fnIsName(
BOOL *pfName) BOOL *pfName)
{ {
ITypeLibImpl *This = impl_from_ITypeLib2(iface); 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, TRACE("(%p)->(%s,%08x,%p)\n", This, debugstr_w(szNameBuf), lHashVal,
pfName); pfName);
...@@ -4564,6 +4565,8 @@ static HRESULT WINAPI ITypeLib2_fnIsName( ...@@ -4564,6 +4565,8 @@ static HRESULT WINAPI ITypeLib2_fnIsName(
if(!memcmp(szNameBuf,pTInfo->Name, nNameBufLen)) goto ITypeLib2_fnIsName_exit; if(!memcmp(szNameBuf,pTInfo->Name, nNameBufLen)) goto ITypeLib2_fnIsName_exit;
for(fdc = 0; fdc < pTInfo->TypeAttr.cFuncs; ++fdc) { for(fdc = 0; fdc < pTInfo->TypeAttr.cFuncs; ++fdc) {
TLBFuncDesc *pFInfo = &pTInfo->funcdescs[fdc]; TLBFuncDesc *pFInfo = &pTInfo->funcdescs[fdc];
int pc;
if(!memcmp(szNameBuf,pFInfo->Name, nNameBufLen)) goto ITypeLib2_fnIsName_exit; if(!memcmp(szNameBuf,pFInfo->Name, nNameBufLen)) goto ITypeLib2_fnIsName_exit;
for(pc=0; pc < pFInfo->funcdesc.cParams; pc++) for(pc=0; pc < pFInfo->funcdesc.cParams; pc++)
if(!memcmp(szNameBuf,pFInfo->pParamDesc[pc].Name, nNameBufLen)) if(!memcmp(szNameBuf,pFInfo->pParamDesc[pc].Name, nNameBufLen))
...@@ -4599,7 +4602,8 @@ static HRESULT WINAPI ITypeLib2_fnFindName( ...@@ -4599,7 +4602,8 @@ static HRESULT WINAPI ITypeLib2_fnFindName(
UINT16 *found) UINT16 *found)
{ {
ITypeLibImpl *This = impl_from_ITypeLib2(iface); ITypeLibImpl *This = impl_from_ITypeLib2(iface);
UINT tic, count = 0; int tic;
UINT count = 0;
UINT len; UINT len;
TRACE("(%p)->(%s %u %p %p %p)\n", This, debugstr_w(name), hash, ppTInfo, memid, found); 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( ...@@ -4616,7 +4620,7 @@ static HRESULT WINAPI ITypeLib2_fnFindName(
if(!memcmp(name, pTInfo->Name, len)) goto ITypeLib2_fnFindName_exit; if(!memcmp(name, pTInfo->Name, len)) goto ITypeLib2_fnFindName_exit;
for(fdc = 0; fdc < pTInfo->TypeAttr.cFuncs; ++fdc) { for(fdc = 0; fdc < pTInfo->TypeAttr.cFuncs; ++fdc) {
TLBFuncDesc *func = &pTInfo->funcdescs[fdc]; TLBFuncDesc *func = &pTInfo->funcdescs[fdc];
UINT pc; int pc;
if(!memcmp(name, func->Name, len)) goto ITypeLib2_fnFindName_exit; if(!memcmp(name, func->Name, len)) goto ITypeLib2_fnFindName_exit;
for(pc = 0; pc < func->funcdesc.cParams; pc++) { for(pc = 0; pc < func->funcdesc.cParams; pc++) {
...@@ -4995,7 +4999,7 @@ static HRESULT WINAPI ITypeLibComp_fnBindType( ...@@ -4995,7 +4999,7 @@ static HRESULT WINAPI ITypeLibComp_fnBindType(
ITypeComp ** ppTComp) ITypeComp ** ppTComp)
{ {
ITypeLibImpl *This = impl_from_ITypeComp(iface); ITypeLibImpl *This = impl_from_ITypeComp(iface);
UINT i; int i;
TRACE("(%s, %x, %p, %p)\n", debugstr_w(szName), lHash, ppTInfo, ppTComp); TRACE("(%s, %x, %p, %p)\n", debugstr_w(szName), lHash, ppTInfo, ppTComp);
...@@ -5097,7 +5101,7 @@ static ULONG WINAPI ITypeInfo_fnAddRef( ITypeInfo2 *iface) ...@@ -5097,7 +5101,7 @@ static ULONG WINAPI ITypeInfo_fnAddRef( ITypeInfo2 *iface)
static void ITypeInfoImpl_Destroy(ITypeInfoImpl *This) static void ITypeInfoImpl_Destroy(ITypeInfoImpl *This)
{ {
UINT i, j; UINT i;
TRACE("destroying ITypeInfo(%p)\n",This); TRACE("destroying ITypeInfo(%p)\n",This);
...@@ -5112,6 +5116,7 @@ static void ITypeInfoImpl_Destroy(ITypeInfoImpl *This) ...@@ -5112,6 +5116,7 @@ static void ITypeInfoImpl_Destroy(ITypeInfoImpl *This)
for (i = 0; i < This->TypeAttr.cFuncs; ++i) for (i = 0; i < This->TypeAttr.cFuncs; ++i)
{ {
int j;
TLBFuncDesc *pFInfo = &This->funcdescs[i]; TLBFuncDesc *pFInfo = &This->funcdescs[i];
for(j = 0; j < pFInfo->funcdesc.cParams; j++) for(j = 0; j < pFInfo->funcdesc.cParams; j++)
{ {
......
...@@ -2050,8 +2050,10 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc( ...@@ -2050,8 +2050,10 @@ static HRESULT WINAPI ICreateTypeInfo2_fnAddFuncDesc(
if(This->dual) if(This->dual)
This->dual->typedata = This->typedata; This->dual->typedata = This->typedata;
} else { } else {
unsigned int j;
iter = This->typedata->next; iter = This->typedata->next;
for(i=0; i<index; i++) for (j = 0; j < index; j++)
iter = iter->next; iter = iter->next;
insert->next = iter->next; insert->next = iter->next;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment