[PATCH:libX11 1/7] cmsColNm.c: maintain constness of arguments to qsort helper function

Alan Coopersmith alan.coopersmith at oracle.com
Sun Feb 17 09:45:42 PST 2013


Fixes gcc warning:

cmsColNm.c: In function 'FirstCmp':
cmsColNm.c:257:20: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
cmsColNm.c:257:45: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 src/xcms/cmsColNm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xcms/cmsColNm.c b/src/xcms/cmsColNm.c
index 73977e5..a6749c0 100644
--- a/src/xcms/cmsColNm.c
+++ b/src/xcms/cmsColNm.c
@@ -254,7 +254,7 @@ FirstCmp(const void *p1, const void *p2)
  *
  */
 {
-    return(strcmp(((XcmsPair *)p1)->first, ((XcmsPair *)p2)->first));
+    return(strcmp(((const XcmsPair *)p1)->first, ((const XcmsPair *)p2)->first));
 }
 
 
-- 
1.7.9.2



More information about the xorg-devel mailing list