From 68dd0b52e13c844d662192654fb10cb993257a59 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 22 Jun 2015 09:36:08 +0200 Subject: Replace 'pointer' type with 'void *' This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer' is used throughout the X server for other things, and having duplicate names generates compiler warnings. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt Rebased against NX: Mike Gabriel --- nx-X11/programs/Xserver/hw/nxagent/NXglyph.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/NXglyph.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c b/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c index cd65fdc0e..47db919ef 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c @@ -147,30 +147,30 @@ ResetGlyphSetPrivateIndex (void) } Bool -_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, pointer ptr) +_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, void * ptr) { - pointer *new; + void **new; if (n > glyphSet->maxPrivate) { if (glyphSet->devPrivates && - glyphSet->devPrivates != (pointer)(&glyphSet[1])) { - new = (pointer *) xrealloc (glyphSet->devPrivates, - (n + 1) * sizeof (pointer)); + glyphSet->devPrivates != (void *)(&glyphSet[1])) { + new = (void **) xrealloc (glyphSet->devPrivates, + (n + 1) * sizeof (void *)); if (!new) return FALSE; } else { - new = (pointer *) xalloc ((n + 1) * sizeof (pointer)); + new = (void **) xalloc ((n + 1) * sizeof (void *)); if (!new) return FALSE; if (glyphSet->devPrivates) memcpy (new, glyphSet->devPrivates, - (glyphSet->maxPrivate + 1) * sizeof (pointer)); + (glyphSet->maxPrivate + 1) * sizeof (void *)); } glyphSet->devPrivates = new; /* Zero out new, uninitialize privates */ while (++glyphSet->maxPrivate < n) - glyphSet->devPrivates[glyphSet->maxPrivate] = (pointer)0; + glyphSet->devPrivates[glyphSet->maxPrivate] = (void *)0; } glyphSet->devPrivates[n] = ptr; return TRUE; @@ -522,14 +522,14 @@ AllocateGlyphSet (int fdepth, PictFormatPtr format) } size = (sizeof (GlyphSetRec) + - (sizeof (pointer) * _GlyphSetPrivateAllocateIndex)); + (sizeof (void *) * _GlyphSetPrivateAllocateIndex)); glyphSet = xalloc (size); if (!glyphSet) return FALSE; bzero((char *)glyphSet, size); glyphSet->maxPrivate = _GlyphSetPrivateAllocateIndex - 1; if (_GlyphSetPrivateAllocateIndex) - glyphSet->devPrivates = (pointer)(&glyphSet[1]); + glyphSet->devPrivates = (void *)(&glyphSet[1]); if (!AllocateGlyphHash (&glyphSet->hash, &glyphHashSets[0])) { @@ -543,7 +543,7 @@ AllocateGlyphSet (int fdepth, PictFormatPtr format) } int -FreeGlyphSet (pointer value, +FreeGlyphSet (void * value, XID gid) { GlyphSetPtr glyphSet = (GlyphSetPtr) value; @@ -571,7 +571,7 @@ FreeGlyphSet (pointer value, xfree (table); if (glyphSet->devPrivates && - glyphSet->devPrivates != (pointer)(&glyphSet[1])) + glyphSet->devPrivates != (void *)(&glyphSet[1])) xfree(glyphSet->devPrivates); xfree (glyphSet); -- cgit v1.2.3