diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2020-08-16 17:57:10 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2020-10-10 14:22:35 -0700 |
commit | 21e05da99c855481b638a7789ad5600b5b283680 (patch) | |
tree | 8ca60df2316771793756d75cd0fca2ac560aeb3e /include/X11/extensions/XKBproto.h | |
parent | 50671520ef98d68d4eb26e09d5249de321b8fef9 (diff) |
XKB: Mark key name arrays as not NUL-terminated strings
They are fixed length (4 characters), and don't need NUL-terminators.
This makes gcc stop warning when they're not NUL-terminated, and instead
warn if they are passed to functions expecting NUL-terminated strings.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'include/X11/extensions/XKBproto.h')
-rw-r--r-- | include/X11/extensions/XKBproto.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/X11/extensions/XKBproto.h b/include/X11/extensions/XKBproto.h index 43b18d8..6eaec95 100644 --- a/include/X11/extensions/XKBproto.h +++ b/include/X11/extensions/XKBproto.h @@ -28,6 +28,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #define _XKBPROTO_H_ #include <X11/Xmd.h> +#include <X11/Xfuncproto.h> #include <X11/extensions/XKB.h> #define Window CARD32 @@ -675,7 +676,7 @@ typedef struct _xkbRowWireDesc { #define sz_xkbRowWireDesc 8 typedef struct _xkbKeyWireDesc { - CARD8 name[XkbKeyNameLength]; + CARD8 name[XkbKeyNameLength] _X_NONSTRING; INT16 gap; CARD8 shapeNdx; CARD8 colorNdx; @@ -698,8 +699,8 @@ typedef struct _xkbOverlayRowWireDesc { #define sz_xkbOverlayRowWireDesc 4 typedef struct _xkbOverlayKeyWireDesc { - CARD8 over[XkbKeyNameLength]; - CARD8 under[XkbKeyNameLength]; + CARD8 over[XkbKeyNameLength] _X_NONSTRING; + CARD8 under[XkbKeyNameLength] _X_NONSTRING; } xkbOverlayKeyWireDesc; #define sz_xkbOverlayKeyWireDesc 8 |