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

View File

@ -16,17 +16,17 @@
typedef struct {
INT index;
const LPCSTR sz;
LPCSTR sz;
} GLYPHNAME;
typedef struct {
LONG UV;
const GLYPHNAME *const name;
const GLYPHNAME *name;
} UNICODEGLYPH;
typedef struct {
INT size;
const UNICODEGLYPH *const glyphs;
const UNICODEGLYPH *glyphs;
} UNICODEVECTOR;
extern const INT PSDRV_AGLGlyphNamesSize;