Commit d91c145a authored by Alan Coopersmith's avatar Alan Coopersmith Committed by Ulrich Sibiller

XStringToKeysym: preserve constness when casting off unsignedness for strcmp

Fixes gcc warning: StrKeysym.c:97:17: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Signed-off-by: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
parent 64170451
...@@ -94,7 +94,7 @@ XStringToKeysym(_Xconst char *s) ...@@ -94,7 +94,7 @@ XStringToKeysym(_Xconst char *s)
{ {
entry = &_XkeyTable[idx]; entry = &_XkeyTable[idx];
if ((entry[0] == sig1) && (entry[1] == sig2) && if ((entry[0] == sig1) && (entry[1] == sig2) &&
!strcmp(s, (char *)entry + 6)) !strcmp(s, (const char *)entry + 6))
{ {
val = (entry[2] << 24) | (entry[3] << 16) | val = (entry[2] << 24) | (entry[3] << 16) |
(entry[4] << 8) | entry[5]; (entry[4] << 8) | entry[5];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment