diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-30 12:13:16 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-01-30 12:24:47 +0000 |
commit | 76e430e92c19ea799547e4e6ae1f389ebc6eaac5 (patch) | |
tree | 9e10a9574da4c8048ce3bca8d5fdce2a549b7bf1 | |
parent | 57445e57d4dfc080620ff0e4f9ec9a63b0feb355 (diff) |
sna: Constify GCFunc to quieten the compiler.
We keep a pointer to the old funcs when wrapping, this now needs to be const.
sna_accel.c: In function 'sna_gc_move_to_cpu':
sna_accel.c:4008:17: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
sgc->old_funcs = gc->funcs;
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna.h | 2 | ||||
-rw-r--r-- | src/sna/sna_accel.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/sna/sna.h b/src/sna/sna.h index 27f5708c..76599fe4 100644 --- a/src/sna/sna.h +++ b/src/sna/sna.h @@ -208,7 +208,7 @@ struct sna_gc { long changes; long serial; - GCFuncs *old_funcs; + const GCFuncs *old_funcs; void *priv; }; diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 36ad9b32..abfc0527 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -4068,7 +4068,7 @@ static void sna_gc_move_to_gpu(GCPtr gc) assert(gc->funcs == (GCFuncs *)&sna_gc_funcs__cpu); gc->ops = (GCOps *)&sna_gc_ops; - gc->funcs = sna_gc(gc)->old_funcs; + gc->funcs = (GCFuncs *)sna_gc(gc)->old_funcs; assert(gc->funcs); gc->pCompositeClip = sna_gc(gc)->priv; assert(gc->pCompositeClip); |