[PATCH 2/3] rootless: fix warnings due to lack of const keeping.

Dave Airlie airlied at gmail.com
Wed Aug 12 16:25:36 PDT 2015


From: Dave Airlie <airlied at redhat.com>

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 miext/rootless/rootlessCommon.h | 4 ++--
 miext/rootless/rootlessGC.c     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/miext/rootless/rootlessCommon.h b/miext/rootless/rootlessCommon.h
index aa55579..7c26111 100644
--- a/miext/rootless/rootlessCommon.h
+++ b/miext/rootless/rootlessCommon.h
@@ -70,8 +70,8 @@ extern DevPrivateKeyRec rootlessWindowOldPixmapPrivateKeyRec;
 
 // RootlessGCRec: private per-gc data
 typedef struct {
-    GCFuncs *originalFuncs;
-    GCOps *originalOps;
+    const GCFuncs *originalFuncs;
+    const GCOps *originalOps;
 } RootlessGCRec;
 
 // RootlessScreenRec: per-screen private data
diff --git a/miext/rootless/rootlessGC.c b/miext/rootless/rootlessGC.c
index 4fba26c..235b3ab 100644
--- a/miext/rootless/rootlessGC.c
+++ b/miext/rootless/rootlessGC.c
@@ -403,7 +403,7 @@ RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc)
 #define GCOP_UNWRAP(pGC) \
     RootlessGCRec *gcrec = (RootlessGCRec *) \
         dixLookupPrivate(&(pGC)->devPrivates, rootlessGCPrivateKey); \
-    GCFuncs *saveFuncs = pGC->funcs; \
+    const GCFuncs *saveFuncs = pGC->funcs; \
     (pGC)->funcs = gcrec->originalFuncs; \
     (pGC)->ops = gcrec->originalOps;
 
-- 
2.4.3



More information about the xorg-devel mailing list