summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-11-26 22:31:41 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-11-26 22:31:41 -0800
commit73cd9d89408ef08b7bbe4f3fb0ae94517441b045 (patch)
treeb5b91fb03c0ce92413c07bfef48af6e05c009c7c
parentca6adf351b4fc317c4dfc4c8e723b84fd676d4e2 (diff)
Sprinkle consts in StrCmp to quiet cast warnings
Makes gcc stop saying: xdpyinfo.c: In function ‘StrCmp’: xdpyinfo.c:162:20: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual] xdpyinfo.c:162:39: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xdpyinfo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xdpyinfo.c b/xdpyinfo.c
index 84d5b2a..2b94394 100644
--- a/xdpyinfo.c
+++ b/xdpyinfo.c
@@ -159,7 +159,7 @@ static int print_event_mask(char *buf, int lastcol, int indent, long mask);
static int StrCmp(const void *a, const void *b)
{
- return strcmp(*(char **)a, *(char **)b);
+ return strcmp(*(const char * const *)a, *(const char * const *)b);
}
static void