usp10: Avoid signed-unsigned integer comparisons.

This commit is contained in:
Andrew Talbot 2013-02-27 21:13:06 +00:00 committed by Alexandre Julliard
parent a5c86d35e3
commit 4ef6a96890
2 changed files with 15 additions and 12 deletions

View File

@ -749,7 +749,8 @@ BOOL BIDI_DetermineLevels(
) )
{ {
WORD *chartype; WORD *chartype;
unsigned baselevel = 0,j; unsigned baselevel = 0;
INT j;
TRACE("%s, %d\n", debugstr_wn(lpString, uCount), uCount); TRACE("%s, %d\n", debugstr_wn(lpString, uCount), uCount);
chartype = HeapAlloc(GetProcessHeap(), 0, uCount * sizeof(WORD)); chartype = HeapAlloc(GetProcessHeap(), 0, uCount * sizeof(WORD));

View File

@ -1017,13 +1017,14 @@ HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *psc)
if (psc && *psc) if (psc && *psc)
{ {
unsigned int i; unsigned int i;
INT n;
for (i = 0; i < GLYPH_MAX / GLYPH_BLOCK_SIZE; i++) for (i = 0; i < GLYPH_MAX / GLYPH_BLOCK_SIZE; i++)
{ {
heap_free(((ScriptCache *)*psc)->widths[i]); heap_free(((ScriptCache *)*psc)->widths[i]);
} }
for (i = 0; i < 0x10; i++) for (i = 0; i < 0x10; i++)
{ {
int j; unsigned int j;
if (((ScriptCache *)*psc)->page[i]) if (((ScriptCache *)*psc)->page[i])
for (j = 0; j < GLYPH_MAX / GLYPH_BLOCK_SIZE; j++) for (j = 0; j < GLYPH_MAX / GLYPH_BLOCK_SIZE; j++)
heap_free(((ScriptCache *)*psc)->page[i]->glyphs[j]); heap_free(((ScriptCache *)*psc)->page[i]->glyphs[j]);
@ -1033,20 +1034,20 @@ HRESULT WINAPI ScriptFreeCache(SCRIPT_CACHE *psc)
heap_free(((ScriptCache *)*psc)->GDEF_Table); heap_free(((ScriptCache *)*psc)->GDEF_Table);
heap_free(((ScriptCache *)*psc)->CMAP_Table); heap_free(((ScriptCache *)*psc)->CMAP_Table);
heap_free(((ScriptCache *)*psc)->GPOS_Table); heap_free(((ScriptCache *)*psc)->GPOS_Table);
for (i = 0; i < ((ScriptCache *)*psc)->script_count; i++) for (n = 0; n < ((ScriptCache *)*psc)->script_count; n++)
{ {
int j; int j;
for (j = 0; j < ((ScriptCache *)*psc)->scripts[i].language_count; j++) for (j = 0; j < ((ScriptCache *)*psc)->scripts[n].language_count; j++)
{ {
int k; int k;
for (k = 0; k < ((ScriptCache *)*psc)->scripts[i].languages[j].feature_count; k++) for (k = 0; k < ((ScriptCache *)*psc)->scripts[n].languages[j].feature_count; k++)
heap_free(((ScriptCache *)*psc)->scripts[i].languages[j].features[k].lookups); heap_free(((ScriptCache *)*psc)->scripts[n].languages[j].features[k].lookups);
heap_free(((ScriptCache *)*psc)->scripts[i].languages[j].features); heap_free(((ScriptCache *)*psc)->scripts[n].languages[j].features);
} }
for (j = 0; j < ((ScriptCache *)*psc)->scripts[i].default_language.feature_count; j++) for (j = 0; j < ((ScriptCache *)*psc)->scripts[n].default_language.feature_count; j++)
heap_free(((ScriptCache *)*psc)->scripts[i].default_language.features[j].lookups); heap_free(((ScriptCache *)*psc)->scripts[n].default_language.features[j].lookups);
heap_free(((ScriptCache *)*psc)->scripts[i].default_language.features); heap_free(((ScriptCache *)*psc)->scripts[n].default_language.features);
heap_free(((ScriptCache *)*psc)->scripts[i].languages); heap_free(((ScriptCache *)*psc)->scripts[n].languages);
} }
heap_free(((ScriptCache *)*psc)->scripts); heap_free(((ScriptCache *)*psc)->scripts);
heap_free(((ScriptCache *)*psc)->otm); heap_free(((ScriptCache *)*psc)->otm);
@ -2843,7 +2844,8 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc,
SCRIPT_GLYPHPROP *pOutGlyphProps, int *pcGlyphs) SCRIPT_GLYPHPROP *pOutGlyphProps, int *pcGlyphs)
{ {
HRESULT hr; HRESULT hr;
unsigned int i,g; int i;
unsigned int g;
BOOL rtl; BOOL rtl;
int cluster; int cluster;