[Xcb] Is SendRequest missing some padding?

Alessandro Arzilli alessandro.arzilli at gmail.com
Thu Sep 18 23:57:37 PDT 2014

On 09/18/2014 07:27 PM, chris at demorecorder.com wrote:
> Hello Alessandro,
> I think we should fix the problem in the generator with <pad align="4" />.
> Can you please try if <pad align="4" /> works with my newest patches which are not yet merged into upstream?
> You can get them with
> git clone http://infra-srv1.demorecorder.com/git/free-sw/xcb/libxcb/
> git clone http://infra-srv1.demorecorder.com/git/free-sw/xcb/proto/

I get the same error I got with libxcb-1.11.

With this SetupRequest:

   <struct name="SetupRequest">
     <field type="CARD8" name="byte_order" />
     <pad bytes="1" />
     <field type="CARD16" name="protocol_major_version" />
     <field type="CARD16" name="protocol_minor_version" />
     <field type="CARD16" name="authorization_protocol_name_len" />
     <field type="CARD16" name="authorization_protocol_data_len" />
     <pad bytes="2" />
     <list type="char" name="authorization_protocol_name">
     <pad align="4" />
     <list type="char" name="authorization_protocol_data">
     <pad align="4" />

I get this error:

xproto.c: In function 'xcb_setup_request_authorization_protocol_data_end':
xproto.c:629:36: error: 'None' undeclared (first use in this function)
      xcb_generic_iterator_t child = None;
xproto.c:629:36: note: each undeclared identifier is reported only once for each 
function it appears in

The error stays even if I remove the second "pad align". Just to be sure the 
branch you wanted me to check out is ParametrizedStruct-V3, right?

Alessandro Arzilli.

More information about the Xcb mailing list