mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 12:19:49 +00:00
d3dxof: Avoid signed-unsigned integer comparisons.
This commit is contained in:
parent
b6663f8a52
commit
1af3862186
2 changed files with 12 additions and 12 deletions
|
@ -248,7 +248,7 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV
|
||||||
|
|
||||||
if (TRACE_ON(d3dxof))
|
if (TRACE_ON(d3dxof))
|
||||||
{
|
{
|
||||||
int i;
|
ULONG i;
|
||||||
TRACE("Registered templates (%d):\n", This->nb_xtemplates);
|
TRACE("Registered templates (%d):\n", This->nb_xtemplates);
|
||||||
for (i = 0; i < This->nb_xtemplates; i++)
|
for (i = 0; i < This->nb_xtemplates; i++)
|
||||||
DPRINTF("%s - %s\n", This->xtemplates[i].name, debugstr_guid(&This->xtemplates[i].class_id));
|
DPRINTF("%s - %s\n", This->xtemplates[i].name, debugstr_guid(&This->xtemplates[i].class_id));
|
||||||
|
@ -326,7 +326,7 @@ static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LP
|
||||||
|
|
||||||
if (TRACE_ON(d3dxof))
|
if (TRACE_ON(d3dxof))
|
||||||
{
|
{
|
||||||
int i;
|
ULONG i;
|
||||||
TRACE("Registered templates (%d):\n", This->nb_xtemplates);
|
TRACE("Registered templates (%d):\n", This->nb_xtemplates);
|
||||||
for (i = 0; i < This->nb_xtemplates; i++)
|
for (i = 0; i < This->nb_xtemplates; i++)
|
||||||
DPRINTF("%s - %s\n", This->xtemplates[i].name, debugstr_guid(&This->xtemplates[i].class_id));
|
DPRINTF("%s - %s\n", This->xtemplates[i].name, debugstr_guid(&This->xtemplates[i].class_id));
|
||||||
|
@ -616,7 +616,7 @@ static HRESULT WINAPI IDirectXFileDataImpl_GetData(IDirectXFileData* iface, LPCS
|
||||||
|
|
||||||
if (szMember)
|
if (szMember)
|
||||||
{
|
{
|
||||||
int i;
|
ULONG i;
|
||||||
for (i = 0; i < This->pobj->nb_members; i++)
|
for (i = 0; i < This->pobj->nb_members; i++)
|
||||||
if (!strcmp(This->pobj->members[i].name, szMember))
|
if (!strcmp(This->pobj->members[i].name, szMember))
|
||||||
break;
|
break;
|
||||||
|
@ -968,7 +968,7 @@ static ULONG WINAPI IDirectXFileEnumObjectImpl_Release(IDirectXFileEnumObject* i
|
||||||
|
|
||||||
if (!ref)
|
if (!ref)
|
||||||
{
|
{
|
||||||
int i;
|
ULONG i;
|
||||||
for (i = 0; i < This->nb_xobjects; i++)
|
for (i = 0; i < This->nb_xobjects; i++)
|
||||||
IDirectXFileData_Release(This->pRefObjects[i]);
|
IDirectXFileData_Release(This->pRefObjects[i]);
|
||||||
if (This->mapped_memory)
|
if (This->mapped_memory)
|
||||||
|
|
|
@ -124,7 +124,7 @@ static const char* get_primitive_string(WORD token)
|
||||||
|
|
||||||
static void dump_template(xtemplate* templates_array, xtemplate* ptemplate)
|
static void dump_template(xtemplate* templates_array, xtemplate* ptemplate)
|
||||||
{
|
{
|
||||||
int j, k;
|
ULONG j, k;
|
||||||
GUID* clsid;
|
GUID* clsid;
|
||||||
|
|
||||||
clsid = &ptemplate->class_id;
|
clsid = &ptemplate->class_id;
|
||||||
|
@ -1171,15 +1171,15 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional);
|
||||||
static BOOL parse_object_members_list(parse_buffer * buf)
|
static BOOL parse_object_members_list(parse_buffer * buf)
|
||||||
{
|
{
|
||||||
DWORD token;
|
DWORD token;
|
||||||
int i;
|
ULONG i;
|
||||||
xtemplate* pt = buf->pxt[buf->level];
|
xtemplate* pt = buf->pxt[buf->level];
|
||||||
|
|
||||||
buf->pxo->nb_members = pt->nb_members;
|
buf->pxo->nb_members = pt->nb_members;
|
||||||
|
|
||||||
for (i = 0; i < pt->nb_members; i++)
|
for (i = 0; i < pt->nb_members; i++)
|
||||||
{
|
{
|
||||||
int k;
|
ULONG k;
|
||||||
int nb_elems = 1;
|
ULONG nb_elems = 1;
|
||||||
|
|
||||||
buf->pxo->members[i].name = pt->members[i].name;
|
buf->pxo->members[i].name = pt->members[i].name;
|
||||||
buf->pxo->members[i].start = buf->cur_pos_data;
|
buf->pxo->members[i].start = buf->cur_pos_data;
|
||||||
|
@ -1192,7 +1192,7 @@ static BOOL parse_object_members_list(parse_buffer * buf)
|
||||||
nb_elems *= *(DWORD*)(buf->pxo->root->pdata + buf->pxo->members[pt->members[i].dim_value[k]].start);
|
nb_elems *= *(DWORD*)(buf->pxo->root->pdata + buf->pxo->members[pt->members[i].dim_value[k]].start);
|
||||||
}
|
}
|
||||||
|
|
||||||
TRACE("Elements to consider: %d\n", nb_elems);
|
TRACE("Elements to consider: %u\n", nb_elems);
|
||||||
|
|
||||||
for (k = 0; k < nb_elems; k++)
|
for (k = 0; k < nb_elems; k++)
|
||||||
{
|
{
|
||||||
|
@ -1213,7 +1213,7 @@ static BOOL parse_object_members_list(parse_buffer * buf)
|
||||||
|
|
||||||
if (pt->members[i].type == TOKEN_NAME)
|
if (pt->members[i].type == TOKEN_NAME)
|
||||||
{
|
{
|
||||||
int j;
|
ULONG j;
|
||||||
|
|
||||||
TRACE("Found sub-object %s\n", buf->pdxf->xtemplates[pt->members[i].idx_template].name);
|
TRACE("Found sub-object %s\n", buf->pdxf->xtemplates[pt->members[i].idx_template].name);
|
||||||
buf->level++;
|
buf->level++;
|
||||||
|
@ -1351,7 +1351,7 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional)
|
||||||
{
|
{
|
||||||
if (check_TOKEN(buf) == TOKEN_OBRACE)
|
if (check_TOKEN(buf) == TOKEN_OBRACE)
|
||||||
{
|
{
|
||||||
int i, j;
|
ULONG i, j;
|
||||||
get_TOKEN(buf);
|
get_TOKEN(buf);
|
||||||
if (get_TOKEN(buf) != TOKEN_NAME)
|
if (get_TOKEN(buf) != TOKEN_NAME)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1423,7 +1423,7 @@ _exit:
|
||||||
|
|
||||||
BOOL parse_object(parse_buffer * buf)
|
BOOL parse_object(parse_buffer * buf)
|
||||||
{
|
{
|
||||||
int i;
|
ULONG i;
|
||||||
|
|
||||||
buf->pxo->pos_data = buf->cur_pos_data;
|
buf->pxo->pos_data = buf->cur_pos_data;
|
||||||
buf->pxo->ptarget = NULL;
|
buf->pxo->ptarget = NULL;
|
||||||
|
|
Loading…
Reference in a new issue