C89 defines memcpy as taking a const void *, so casting from const unsigned char * to char * simply angers gcc for no benefit:
KeyBind.c:1017:24: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Signed-off-by: Alan Coopersmith <[email protected]> --- src/KeyBind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KeyBind.c b/src/KeyBind.c index 221cedd..f22feca 100644 --- a/src/KeyBind.c +++ b/src/KeyBind.c @@ -1014,7 +1014,7 @@ XRebindKeysym ( dpy->key_bindings = p; dpy->free_funcs->key_bindings = _XFreeKeyBindings; p->next = tmp; /* chain onto list */ - memcpy (p->string, (char *) str, nbytes); + memcpy (p->string, str, nbytes); p->len = nbytes; memcpy ((char *) p->modifiers, (char *) mlist, nb); p->key = keysym; -- 1.7.9.2 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
