Use typecasts to suppress compiler warnings.
This commit is contained in:
parent
67f0be15c5
commit
60268d1da9
|
@ -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",
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue