diff options
Diffstat (limited to 'nx-X11/lib/src/xkb/XKBBind.c')
-rw-r--r-- | nx-X11/lib/src/xkb/XKBBind.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/nx-X11/lib/src/xkb/XKBBind.c b/nx-X11/lib/src/xkb/XKBBind.c index ffe5ad9d7..726f3b2cc 100644 --- a/nx-X11/lib/src/xkb/XKBBind.c +++ b/nx-X11/lib/src/xkb/XKBBind.c @@ -179,7 +179,7 @@ XKeysymToKeycode(Display *dpy, KeySym ks) for (i = dpy->min_keycode; i <= dpy->max_keycode; i++) { if (j < (int) XkbKeyNumSyms(xkb, i)) { gotOne = 1; - if (XkbKeySym(xkb, i, j) == ks) + if ((XkbKeySym(xkb, i, j) == ks)) return i; } } @@ -236,7 +236,21 @@ XLookupKeysym(register XKeyEvent * event, int col) if (_XkbUnavailable(dpy)) return _XLookupKeysym(event, col); _XkbCheckPendingRefresh(dpy, dpy->xkb_info); + +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +#elif defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif return XKeycodeToKeysym(dpy, event->keycode, col); +#ifdef __clang__ +#pragma clang diagnostic pop +#elif defined(__GNUC__) +#pragma GCC diagnostic pop +#endif + } /* @@ -601,8 +615,8 @@ _XkbReloadDpy(Display *dpy) } int -XkbTranslateKeySym(register Display *dpy, - register KeySym *sym_rtrn, +XkbTranslateKeySym(Display *dpy, + KeySym *sym_rtrn, unsigned int mods, char *buffer, int nbytes, @@ -770,7 +784,7 @@ XkbLookupKeyBinding(Display *dpy, *extra_rtrn = (tmp - nbytes); tmp = nbytes; } - memcpy(buffer, p->string, tmp); + memcpy(buffer, p->string, (size_t) tmp); if (tmp < nbytes) buffer[tmp] = '\0'; return tmp; |