summaryrefslogtreecommitdiff
path: root/include/X11/Xauth.h
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2012-12-16 15:50:52 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2012-12-21 18:53:03 -0800
commite04364efccbb3bb4cfc5f4cb491ffa1faaaacbdb (patch)
tree9b2d29fa3c49531a5a7a3ca3edd360f80665ea59 /include/X11/Xauth.h
parent4d43b4554f8e35bf8122ae9d2f1bbc0e56fe6d37 (diff)
Tell clang to shut up about the padding in struct xauth
We can't clean it up without breaking ABI, so disable the warnings for it: ./include/X11/Xauth.h:33:19: warning: padding struct 'struct xauth' with 4 bytes to align 'address' [-Wpadded] char *address; ^ ./include/X11/Xauth.h:35:19: warning: padding struct 'struct xauth' with 6 bytes to align 'number' [-Wpadded] char *number; ^ ./include/X11/Xauth.h:37:19: warning: padding struct 'struct xauth' with 6 bytes to align 'name' [-Wpadded] char *name; ^ ./include/X11/Xauth.h:39:18: warning: padding struct 'struct xauth' with 6 bytes to align 'data' [-Wpadded] char *data; ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'include/X11/Xauth.h')
-rw-r--r--include/X11/Xauth.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/X11/Xauth.h b/include/X11/Xauth.h
index f57a1b3..a707bed 100644
--- a/include/X11/Xauth.h
+++ b/include/X11/Xauth.h
@@ -27,6 +27,14 @@ in this Software without prior written authorization from The Open Group.
#ifndef _Xauth_h
#define _Xauth_h
+/* struct xauth is full of implicit padding to properly align the pointers
+ after the length fields. We can't clean that up without breaking ABI,
+ so tell clang not to bother complaining about it. */
+#ifdef __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wpadded"
+#endif
+
typedef struct xauth {
unsigned short family;
unsigned short address_length;
@@ -39,6 +47,10 @@ typedef struct xauth {
char *data;
} Xauth;
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+
#ifndef _XAUTH_STRUCT_ONLY
# include <X11/Xfuncproto.h>