Exempt XLookupKeysym from XKeycodeToKeysym deprecation warnings

Gets rid of:
src/xkb/XKBBind.c: In function ‘XLookupKeysym’:
src/xkb/XKBBind.c:234:5: warning: ‘XKeycodeToKeysym’ is deprecated
[https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdeprecated-declarations-Wdeprecated-declarations]
  234 |     return XKeycodeToKeysym(dpy, event->keycode, col);
      |     ^~~~~~
src/xkb/XKBBind.c:96:1: note: declared here
   96 | XKeycodeToKeysym(Display *dpy,
      | ^~~~~~~~~~~~~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Alan Coopersmith 2020-08-16 17:03:24 -07:00
parent a64eb5f478
commit d127217f26

View file

@ -222,7 +222,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
}
/*