[Xcb] c_client.py: enumerator values generation

Litvinenko, Evgeny EVLitvinenko at luxoft.com
Sun Jan 15 01:51:32 UTC 2017


I've tried to build libxcb-1.12 (with gcc option -pedantic-errors)
and got the following error:

In file included from xinput.c:14:0:
xinput.h:3079:35: error: ISO C restricts enumerator values to range of 'int' [-Wpedantic]

The file xinput.h is generated during build by python script 'c_client.py'
as follows:

/usr/bin/python ./c_client.py   -c "libxcb 1.12" -l "X Version 11" \
        -s "3" -p /usr/lib/python2.7/site-packages \

The resulted file xinput.h contains the structure that gives the error:

    typedef enum xcb_input_modifier_mask_t {
        XCB_INPUT_MODIFIER_MASK_ANY = 2147483648
    } xcb_input_modifier_mask_t;

The structure is generated based on the followin code in xcb/proto/src/xinput.xml

    <enum name="ModifierMask">
        <item name="Any"> <bit>31</bit> </item>

Is it correct that xinput.h has number 2147483648 (which is 32bit long)
where as we have '<bit>31</bit>' in xinput.xml?



This e-mail and any attachment(s) are intended only for the recipient(s) named above and others who have been specifically authorized to receive them. They may contain confidential information. If you are not the intended recipient, please do not read this email or its attachment(s). Furthermore, you are hereby notified that any dissemination, distribution or copying of this e-mail and any attachment(s) is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender by replying to this e-mail and then delete this e-mail and any attachment(s) or copies thereof from your system. Thank you.

More information about the Xcb mailing list