[Xcb] [PATCH] Add RandR 1.3 requests

Peter Harris pharris at opentext.com
Wed Apr 22 09:56:44 PDT 2009


Julien Cristau wrote:
> On Tue, Apr 21, 2009 at 11:37:58 +0200, Julien Cristau wrote:
> 
>> +		<reply>
>> +			<field type="CARD8" name="status" /> <!-- enum SetConfig -->
>> +			<field type="TIMESTAMP" name="timestamp" />
>> +		</reply>
> 
> One question before I send a rebased patch.  I noticed that explicit
> trailing padding was added in some places which seemed weird to me.  In
> the whole protocol, a reply is at least 32 bytes, so I'd have thought
> that this doesn't need to be explicit in each description.  So, do I
> need explicit padding in places like this?

No. You don't *need* explicit padding at the end of a reply, although it
doesn't hurt.

The explicit trailing padding is more needed inside <struct>. At one
point, someone turned on -Wpadded and silenced all the warnings, even
the harmless ones, which is (I believe) where most of the reply padding
came from.

(In this particular case, -Wpadded might not even complain, since the
whole reply structure will be an integer multiple of 32 bits)

Peter Harris
-- 
               Open Text Connectivity Solutions Group
Peter Harris                    http://www.opentext.com/connectivity
Research and Development        Phone: +1 905 762 6001
pharris at opentext.com            Toll Free: 1 877 359 4866


More information about the Xcb mailing list