Commit 2f6e8eb7 authored by Keith Packard's avatar Keith Packard
Browse files

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's avatarKeith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
parent c706fb0d
...@@ -359,7 +359,7 @@ damageCreateGC(GCPtr pGC) ...@@ -359,7 +359,7 @@ damageCreateGC(GCPtr pGC)
#define DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable) \ #define DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable) \
damageGCPriv(pGC); \ damageGCPriv(pGC); \
GCFuncs *oldFuncs = pGC->funcs; \ const GCFuncs *oldFuncs = pGC->funcs; \
unwrap(pGCPriv, pGC, funcs); \ unwrap(pGCPriv, pGC, funcs); \
unwrap(pGCPriv, pGC, ops); \ unwrap(pGCPriv, pGC, ops); \
...@@ -379,7 +379,6 @@ damageCreateGC(GCPtr pGC) ...@@ -379,7 +379,6 @@ damageCreateGC(GCPtr pGC)
static void static void
damageValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) damageValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable)
{ {
drawableDamage(pDrawable);
DAMAGE_GC_FUNC_PROLOGUE(pGC); DAMAGE_GC_FUNC_PROLOGUE(pGC);
(*pGC->funcs->ValidateGC) (pGC, changes, pDrawable); (*pGC->funcs->ValidateGC) (pGC, changes, pDrawable);
pGCPriv->ops = pGC->ops; /* just so it's not NULL */ pGCPriv->ops = pGC->ops; /* just so it's not NULL */
......
...@@ -76,8 +76,8 @@ typedef struct _damageScrPriv { ...@@ -76,8 +76,8 @@ typedef struct _damageScrPriv {
} DamageScrPrivRec, *DamageScrPrivPtr; } DamageScrPrivRec, *DamageScrPrivPtr;
typedef struct _damageGCPriv { typedef struct _damageGCPriv {
GCOps *ops; const GCOps *ops;
GCFuncs *funcs; const GCFuncs *funcs;
} DamageGCPrivRec, *DamageGCPrivPtr; } DamageGCPrivRec, *DamageGCPrivPtr;
/* XXX should move these into damage.c, damageScrPrivateIndex is static */ /* XXX should move these into damage.c, damageScrPrivateIndex is static */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment