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:
parent
c706fb0db8
commit
2f6e8eb70d
|
@ -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)
|
||||||
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 {
|
||||||
} 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 */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user