reform the code.

less warings and errors in vc

svn path=/trunk/; revision=27758
This commit is contained in:
Magnus Olsen 2007-07-20 16:59:44 +00:00
parent 7fd0ba2791
commit a67d29ae20
3 changed files with 46 additions and 44 deletions

View file

@ -297,6 +297,7 @@ NtGdiCreateEnhMetaFile(HDC hDCRef,
DWORD length = 0; DWORD length = 0;
HDC tempHDC; HDC tempHDC;
DWORD MemSize; DWORD MemSize;
DWORD dwDesiredAccess;
tempHDC = hDCRef; tempHDC = hDCRef;
if (hDCRef == NULL) if (hDCRef == NULL)
@ -407,7 +408,7 @@ NtGdiCreateEnhMetaFile(HDC hDCRef,
DPRINT1("Trying Create EnhMetaFile\n"); DPRINT1("Trying Create EnhMetaFile\n");
/* disk based metafile */ /* disk based metafile */
DWORD dwDesiredAccess = GENERIC_WRITE | GENERIC_READ | SYNCHRONIZE | FILE_READ_ATTRIBUTES; dwDesiredAccess = GENERIC_WRITE | GENERIC_READ | SYNCHRONIZE | FILE_READ_ATTRIBUTES;
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
IO_STATUS_BLOCK IoStatusBlock; IO_STATUS_BLOCK IoStatusBlock;
IO_STATUS_BLOCK Iosb; IO_STATUS_BLOCK Iosb;
@ -427,7 +428,6 @@ NtGdiCreateEnhMetaFile(HDC hDCRef,
return NULL; return NULL;
} }
InitializeObjectAttributes(&ObjectAttributes, &NtPathU, 0, NULL, NULL); InitializeObjectAttributes(&ObjectAttributes, &NtPathU, 0, NULL, NULL);
Status = NtCreateFile (&Dc->hFile, dwDesiredAccess, &ObjectAttributes, &IoStatusBlock, Status = NtCreateFile (&Dc->hFile, dwDesiredAccess, &ObjectAttributes, &IoStatusBlock,

View file

@ -213,8 +213,6 @@ NtGdiGetPath(
INT ret = -1; INT ret = -1;
GdiPath *pPath; GdiPath *pPath;
DPRINT("Enter NtGdiGetPath\n");
DC *dc = DC_LockDc(hDC); DC *dc = DC_LockDc(hDC);
if(!dc) if(!dc)
{ {

View file

@ -2502,6 +2502,8 @@ NtGdiGetGlyphOutline(
INT adv, lsb, bbx; /* These three hold to widths of the unrotated chars */ INT adv, lsb, bbx; /* These three hold to widths of the unrotated chars */
OUTLINETEXTMETRICW *potm; OUTLINETEXTMETRICW *potm;
PVOID pvBuf = NULL; PVOID pvBuf = NULL;
int n = 0;
FT_CharMap found = 0, charmap;
DPRINT("%p, %d, %08x, %p, %08lx, %p, %p\n", hdc, wch, iFormat, pgm, DPRINT("%p, %d, %08x, %p, %08lx, %p, %p\n", hdc, wch, iFormat, pgm,
cjBuf, UnsafeBuf, pmat2); cjBuf, UnsafeBuf, pmat2);
@ -2544,8 +2546,8 @@ NtGdiGetGlyphOutline(
{ {
DPRINT("WARNING: No charmap selected!\n"); DPRINT("WARNING: No charmap selected!\n");
DPRINT("This font face has %d charmaps\n", ft_face->num_charmaps); DPRINT("This font face has %d charmaps\n", ft_face->num_charmaps);
int n;
FT_CharMap found = 0, charmap;
for (n = 0; n < ft_face->num_charmaps; n++) for (n = 0; n < ft_face->num_charmaps; n++)
{ {
@ -4159,13 +4161,15 @@ NtGdiGetSetTextCharExtra( HDC hDC, INT CharExtra, BOOL Set)
{ {
/* Ulta-Ugly Hax! */ /* Ulta-Ugly Hax! */
INT Ret = 0x80000000; INT Ret = 0x80000000;
DPRINT("TextCharacterExtra %d", CharExtra);
PDC dc = DC_LockDc ( hDC ); PDC dc = DC_LockDc ( hDC );
if (!dc) if (!dc)
{ {
DPRINT("TextCharacterExtra %d", CharExtra);
SetLastWin32Error(ERROR_INVALID_HANDLE); SetLastWin32Error(ERROR_INVALID_HANDLE);
return Ret; return Ret;
} }
DPRINT("TextCharacterExtra %d", CharExtra);
Ret = dc->w.charExtra; Ret = dc->w.charExtra;
if( Set ) dc->w.charExtra = CharExtra; if( Set ) dc->w.charExtra = CharExtra;
DC_UnlockDc(dc); DC_UnlockDc(dc);