From a0e44ddfb0c641e7896a55abf26621ae3d17e337 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 12 Dec 2014 22:33:54 -0800 Subject: [PATCH] dmx: constify GCOps & GCFuncs pointers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gets rid of 16 instances of gcc 4.8 warnings: In file included from dmxgc.c:41:0: dmx.h:327:23: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] (_saved)->_entry = (_actual)->_entry; \ ^ dmxgc.h:80:5: note: in expansion of macro ‘DMX_WRAP’ DMX_WRAP(funcs, &dmxGCFuncs, _pGCPriv, (_pGC)); \ ^ dmxgc.c:192:5: note: in expansion of macro ‘DMX_GC_FUNC_EPILOGUE’ DMX_GC_FUNC_EPILOGUE(pGC); ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard --- hw/dmx/dmxgc.c | 4 ++-- hw/dmx/dmxgc.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/dmx/dmxgc.c b/hw/dmx/dmxgc.c index 234316797..ec15d27aa 100644 --- a/hw/dmx/dmxgc.c +++ b/hw/dmx/dmxgc.c @@ -49,7 +49,7 @@ #include "pixmapstr.h" #include "migc.h" -static GCFuncs dmxGCFuncs = { +static const GCFuncs dmxGCFuncs = { dmxValidateGC, dmxChangeGC, dmxCopyGC, @@ -59,7 +59,7 @@ static GCFuncs dmxGCFuncs = { dmxCopyClip, }; -static GCOps dmxGCOps = { +static const GCOps dmxGCOps = { dmxFillSpans, dmxSetSpans, dmxPutImage, diff --git a/hw/dmx/dmxgc.h b/hw/dmx/dmxgc.h index c8ecb53a0..c5c6b7732 100644 --- a/hw/dmx/dmxgc.h +++ b/hw/dmx/dmxgc.h @@ -41,8 +41,8 @@ /** GC private area. */ typedef struct _dmxGCPriv { - GCOps *ops; - GCFuncs *funcs; + const GCOps *ops; + const GCFuncs *funcs; XlibGC gc; Bool msc; } dmxGCPrivRec, *dmxGCPrivPtr;