damage: Clean up warnings

GC funcs and ops are const now, so all wrappers need to declare them
as such.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Keith Packard 2013-11-15 22:02:58 +09:00
parent c706fb0db8
commit 2f6e8eb70d
2 changed files with 3 additions and 4 deletions

View File

@ -359,7 +359,7 @@ damageCreateGC(GCPtr pGC)
#define DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable) \
damageGCPriv(pGC); \
GCFuncs *oldFuncs = pGC->funcs; \
const GCFuncs *oldFuncs = pGC->funcs; \
unwrap(pGCPriv, pGC, funcs); \
unwrap(pGCPriv, pGC, ops); \
@ -379,7 +379,6 @@ damageCreateGC(GCPtr pGC)
static void
damageValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
{
drawableDamage(pDrawable);
DAMAGE_GC_FUNC_PROLOGUE(pGC);
(*pGC->funcs->ValidateGC) (pGC, changes, pDrawable);
pGCPriv->ops = pGC->ops; /* just so it's not NULL */

View File

@ -76,8 +76,8 @@ typedef struct _damageScrPriv {
} DamageScrPrivRec, *DamageScrPrivPtr;
typedef struct _damageGCPriv {
GCOps *ops;
GCFuncs *funcs;
const GCOps *ops;
const GCFuncs *funcs;
} DamageGCPrivRec, *DamageGCPrivPtr;
/* XXX should move these into damage.c, damageScrPrivateIndex is static */