dmx: constify GCOps & GCFuncs pointers
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 <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Reviewed-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
9682c47e22
commit
a0e44ddfb0
|
@ -49,7 +49,7 @@
|
||||||
#include "pixmapstr.h"
|
#include "pixmapstr.h"
|
||||||
#include "migc.h"
|
#include "migc.h"
|
||||||
|
|
||||||
static GCFuncs dmxGCFuncs = {
|
static const GCFuncs dmxGCFuncs = {
|
||||||
dmxValidateGC,
|
dmxValidateGC,
|
||||||
dmxChangeGC,
|
dmxChangeGC,
|
||||||
dmxCopyGC,
|
dmxCopyGC,
|
||||||
|
@ -59,7 +59,7 @@ static GCFuncs dmxGCFuncs = {
|
||||||
dmxCopyClip,
|
dmxCopyClip,
|
||||||
};
|
};
|
||||||
|
|
||||||
static GCOps dmxGCOps = {
|
static const GCOps dmxGCOps = {
|
||||||
dmxFillSpans,
|
dmxFillSpans,
|
||||||
dmxSetSpans,
|
dmxSetSpans,
|
||||||
dmxPutImage,
|
dmxPutImage,
|
||||||
|
|
|
@ -41,8 +41,8 @@
|
||||||
|
|
||||||
/** GC private area. */
|
/** GC private area. */
|
||||||
typedef struct _dmxGCPriv {
|
typedef struct _dmxGCPriv {
|
||||||
GCOps *ops;
|
const GCOps *ops;
|
||||||
GCFuncs *funcs;
|
const GCFuncs *funcs;
|
||||||
XlibGC gc;
|
XlibGC gc;
|
||||||
Bool msc;
|
Bool msc;
|
||||||
} dmxGCPrivRec, *dmxGCPrivPtr;
|
} dmxGCPrivRec, *dmxGCPrivPtr;
|
||||||
|
|
Loading…
Reference in New Issue