VirtualBox

Changeset 59220 in vbox for trunk


Ignore:
Timestamp:
Dec 24, 2015 11:36:16 PM (9 years ago)
Author:
vboxsync
Message:

NAT: Silence gcc -pedantic warnings about implementaion-defined type
for bit-fields with a bit of preprocessor sugar-coating.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/hostres.c

    r59219 r59220  
    3232    uint16_t id;
    3333
     34#ifdef RT_OS_WINDOWS
     35  /* size of the type forces alignment */
     36# define U16_BIT_FIELD_T uint16_t
     37#else
     38  /* gcc -pedantic complains about implementaion-defined types */
     39# define U16_BIT_FIELD_T unsigned int
     40#endif
     41
    3442    /* XXX: endianness */
    35     uint16_t rd:1;
    36     uint16_t tc:1;
    37     uint16_t aa:1;
    38     uint16_t opcode:4;
    39     uint16_t qr:1;
    40     uint16_t rcode:4;
    41     uint16_t Z:3;
    42     uint16_t ra:1;
     43    U16_BIT_FIELD_T rd:1;
     44    U16_BIT_FIELD_T tc:1;
     45    U16_BIT_FIELD_T aa:1;
     46    U16_BIT_FIELD_T opcode:4;
     47    U16_BIT_FIELD_T qr:1;
     48    U16_BIT_FIELD_T rcode:4;
     49    U16_BIT_FIELD_T Z:3;
     50    U16_BIT_FIELD_T ra:1;
    4351
    4452    uint16_t qdcount;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette