xorgproto: Branch 'master' - 2 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sat Oct 10 21:23:57 UTC 2020
include/X11/Xfuncproto.h | 8 ++++++++
include/X11/extensions/XKBproto.h | 7 ++++---
include/X11/extensions/XKBstr.h | 7 ++++---
xproto.pc.in | 2 +-
4 files changed, 17 insertions(+), 7 deletions(-)
New commits:
commit 21e05da99c855481b638a7789ad5600b5b283680
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sun Aug 16 17:57:10 2020 -0700
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 at oracle.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
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
diff --git a/include/X11/extensions/XKBstr.h b/include/X11/extensions/XKBstr.h
index ef26911..eaefae8 100644
--- a/include/X11/extensions/XKBstr.h
+++ b/include/X11/extensions/XKBstr.h
@@ -27,6 +27,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef _XKBSTR_H_
#define _XKBSTR_H_
+#include <X11/Xfuncproto.h>
#include <X11/extensions/XKB.h>
#define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f))
@@ -401,12 +402,12 @@ typedef struct _XkbIndicatorRec {
} XkbIndicatorRec,*XkbIndicatorPtr;
typedef struct _XkbKeyNameRec {
- char name[XkbKeyNameLength];
+ char name[XkbKeyNameLength] _X_NONSTRING;
} XkbKeyNameRec,*XkbKeyNamePtr;
typedef struct _XkbKeyAliasRec {
- char real[XkbKeyNameLength];
- char alias[XkbKeyNameLength];
+ char real[XkbKeyNameLength] _X_NONSTRING;
+ char alias[XkbKeyNameLength] _X_NONSTRING;
} XkbKeyAliasRec,*XkbKeyAliasPtr;
/*
commit 50671520ef98d68d4eb26e09d5249de321b8fef9
Author: Alan Coopersmith <alan.coopersmith at oracle.com>
Date: Sun Aug 16 17:55:22 2020 -0700
Xfuncproto: define _X_NONSTRING for __attribute__((nonstring))
Bumps xproto version to 7.0.33
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
diff --git a/include/X11/Xfuncproto.h b/include/X11/Xfuncproto.h
index 89bc96f..f689073 100644
--- a/include/X11/Xfuncproto.h
+++ b/include/X11/Xfuncproto.h
@@ -218,4 +218,12 @@ in this Software without prior written authorization from The Open Group.
# define _X_NOTSAN
#endif
+/* Mark a char array/pointer as not containing a NUL-terminated string */
+/* requires xproto >= 7.0.33 */
+#if __has_attribute(nonstring)
+# define _X_NONSTRING __attribute__((nonstring))
+#else
+# define _X_NONSTRING
+#endif
+
#endif /* _XFUNCPROTO_H_ */
diff --git a/xproto.pc.in b/xproto.pc.in
index 9274236..9e288c7 100644
--- a/xproto.pc.in
+++ b/xproto.pc.in
@@ -4,5 +4,5 @@ includex11dir=@includedir@/X11
Name: Xproto
Description: Xproto headers
-Version: 7.0.32
+Version: 7.0.33
Cflags: -I${includedir}
More information about the xorg-commit
mailing list