dlls/gdi32/font.c -- fix type of loop variables (RESEND)
Gerald Pfeifer
gerald at pfeifer.com
Wed Nov 28 16:18:12 CST 2007
This addressess a couple of warnings I found in one of my builds with
GCC 4.3 snapshots. Since Alexandre indicated we'd like to build warning
free I dare resend this. ;-)
Gerald
---------- Forwarded message ----------
From: Gerald Pfeifer <gerald at pfeifer.com>
To: <wine-patches at winehq.org>
Date: Sat, 3 Nov 2007 15:18:16 +0100 (CET)
Subject: dlls/gdi32/font.c -- fix type of loop variables
ChangeLog:
Fix the type of two loop variables.
Index: dlls/gdi32/font.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi32/font.c,v
retrieving revision 1.27
diff -u -3 -p -r1.27 font.c
--- dlls/gdi32/font.c 27 Sep 2007 19:50:03 -0000 1.27
+++ dlls/gdi32/font.c 3 Nov 2007 14:17:24 -0000
@@ -2128,7 +2128,8 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x,
{
HFONT orig_font = dc->hFont, cur_font;
UINT glyph;
- INT span = 0, *offsets = NULL, i;
+ INT span = 0, *offsets = NULL;
+ unsigned i;
glyphs = HeapAlloc(GetProcessHeap(), 0, count * sizeof(WORD));
for(i = 0; i < count; i++)
@@ -2138,12 +2139,12 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x,
{
if(!offsets)
{
- int j;
offsets = HeapAlloc(GetProcessHeap(), 0, count * sizeof(*deltas));
offsets[0] = 0;
if(!deltas)
{
SIZE tmpsz;
+ unsigned j;
for(j = 1; j < count; j++)
{
GetTextExtentPointW(hdc, reordered_str + j - 1, 1, &tmpsz);
@@ -2152,6 +2153,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x,
}
else
{
+ unsigned j;
for(j = 1; j < count; j++)
offsets[j] = offsets[j-1] + deltas[j];
}
More information about the wine-patches
mailing list