[PATCH 14/44] damage: Clean up warnings
Keith Packard
keithp at keithp.com
Wed Dec 11 12:23:46 PST 2013
GC funcs and ops are const now, so all wrappers need to declare them
as such.
Signed-off-by: Keith Packard <keithp at keithp.com>
---
miext/damage/damage.c | 3 +--
miext/damage/damagestr.h | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/miext/damage/damage.c b/miext/damage/damage.c
index 173fe50..55d8c41 100644
--- a/miext/damage/damage.c
+++ b/miext/damage/damage.c
@@ -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 */
diff --git a/miext/damage/damagestr.h b/miext/damage/damagestr.h
index 36753ee..2786156 100644
--- a/miext/damage/damagestr.h
+++ b/miext/damage/damagestr.h
@@ -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 */
--
1.8.4.4
More information about the xorg-devel
mailing list