Use typecasts to suppress compiler warnings.

This commit is contained in:
Ian Pilcher 2001-04-23 18:12:45 +00:00 committed by Alexandre Julliard
parent 67f0be15c5
commit 60268d1da9
2 changed files with 9 additions and 16 deletions

View File

@ -65,18 +65,11 @@ INT PSDRV_GlyphListInit()
* be initialized without generating compiler warnings * be initialized without generating compiler warnings
* *
*/ */
typedef struct inline static INT GlyphListInsert(LPCSTR szName, INT index)
{ {
INT index; GLYPHNAME *g;
LPSTR sz;
} _glyphname;
inline INT GlyphListInsert(LPCSTR szName, INT index) g = HeapAlloc(PSDRV_Heap, 0, sizeof(GLYPHNAME) + strlen(szName) + 1);
{
_glyphname *g;
g = (_glyphname *)HeapAlloc(PSDRV_Heap, 0,
sizeof(GLYPHNAME) + strlen(szName) + 1);
if (g == NULL) if (g == NULL)
{ {
ERR("Failed to allocate %i bytes of memory\n", ERR("Failed to allocate %i bytes of memory\n",
@ -86,7 +79,7 @@ inline INT GlyphListInsert(LPCSTR szName, INT index)
g->index = -1; g->index = -1;
g->sz = (LPSTR)(g + 1); g->sz = (LPSTR)(g + 1);
strcpy(g->sz, szName); strcpy((LPSTR)g->sz, szName);
if (glyphListSize % GLYPHLIST_ALLOCSIZE == 0) /* grow the list? */ if (glyphListSize % GLYPHLIST_ALLOCSIZE == 0) /* grow the list? */
{ {
@ -114,7 +107,7 @@ inline INT GlyphListInsert(LPCSTR szName, INT index)
(glyphListSize - index) * sizeof(GLYPHNAME *)); (glyphListSize - index) * sizeof(GLYPHNAME *));
} }
glyphList[index] = (GLYPHNAME *)g; glyphList[index] = g;
++glyphListSize; ++glyphListSize;
TRACE("Added '%s' at glyphList[%i] (glyphListSize now %i)\n", TRACE("Added '%s' at glyphList[%i] (glyphListSize now %i)\n",

View File

@ -15,18 +15,18 @@
#include "winspool.h" #include "winspool.h"
typedef struct { typedef struct {
INT index; INT index;
const LPCSTR sz; LPCSTR sz;
} GLYPHNAME; } GLYPHNAME;
typedef struct { typedef struct {
LONG UV; LONG UV;
const GLYPHNAME *const name; const GLYPHNAME *name;
} UNICODEGLYPH; } UNICODEGLYPH;
typedef struct { typedef struct {
INT size; INT size;
const UNICODEGLYPH *const glyphs; const UNICODEGLYPH *glyphs;
} UNICODEVECTOR; } UNICODEVECTOR;
extern const INT PSDRV_AGLGlyphNamesSize; extern const INT PSDRV_AGLGlyphNamesSize;