[Xcb] Question about XML spec, and QueryExtension

Peter Harris peter.harris at hummingbird.com
Wed Aug 27 09:54:49 PDT 2008


Julien Danjou wrote:
> At 1219817072 time_t, Barton C Massey wrote:
>>> It would be interesting to compile all of XCB with -Wpadded to see what 
>>> other bugs there are in the XML definitions.  
>> Indeed.  Someone want to try this?  I suppose I'll get to it eventually
>> if no one else does, but it may be a long while.  I think it just amounts
>> to some kind of compile with and without followed by a diff?
> 
> I did.

Thanks!

> I did not fixed the:
>   warning: padding struct size to alignment boundary
> since I doubt adding padding bytes at the end of the structure
> is useful. If so, I can fix that too.

Actually, it is useful. If you look at my xv patch, one of the fixes is
exactly this. Without the padding at the end of the structure, an array
of those structures is too small.

Further, this whole discussion was kicked off by the lack of padding at
the end of QueryExtension. Without the padding, the name of the
extension starts two bytes too early, and the reply is always present=False.

Please do fix those other warnings if you get the chance.

> This is my first time playing with padding stuff so please,
> Peter and Barton, I'll be happy if you can review this.

Looks "obviously correct", although I didn't dig into the extension
references to validate those by hand.

Thanks again.

Peter Harris

-- 
     Hummingbird Connectivity - A Division of Open Text
Peter Harris                    http://connectivity.hummingbird.com
Research and Development        Phone: +1 905 762 6001
peter.harris at hummingbird.com    Toll Free: 1 877 359 4866


More information about the Xcb mailing list