summaryrefslogtreecommitdiff
path: root/Xvproto.h
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-06-23 00:34:52 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-06-23 11:38:25 -0700
commit1a96222d64cde75e20fd9bb7a717cf269c7e9a59 (patch)
tree019f5a59d17c0d155f5089d6ad20fc2eb3255e14 /Xvproto.h
parentd97051236bba088688681f348086feb733cbdd08 (diff)
Xvproto.h: fix xvQueryEncodingsReply to match actual wire protocol
padl3 was declared as CARD32, which for proper alignment, got two additional bytes of padding silently inserted before it. Declaring it as CARD16 aligns it properly after the CARD16 num_encodings. Fixes clang warning: Xvproto.h:462:10: warning: padding struct 'struct _QueryEncodingsReply' with 2 bytes to align 'padl3' [-Wpadded] CARD32 padl3 B32; ^ This makes sizeof(xvQueryEncodingsReply) match the sz_xvQueryEncodingsReply which is used in libXv & the X server for the size sent over the wire. Reported-by: Daniel Martin <consume.noise@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'Xvproto.h')
-rw-r--r--Xvproto.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Xvproto.h b/Xvproto.h
index 926df06..f501566 100644
--- a/Xvproto.h
+++ b/Xvproto.h
@@ -459,7 +459,7 @@ typedef struct _QueryEncodingsReply {
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 num_encodings B16;
- CARD32 padl3 B32;
+ CARD16 padl3 B16;
CARD32 padl4 B32;
CARD32 padl5 B32;
CARD32 padl6 B32;