Hi,

thanks for your suggestions.

On Fri, 2013-01-04 at 20:20 +0000, Blue Swirl wrote:
> On Wed, Jan 2, 2013 at 1:29 PM, Tim Hardeck <thard...@suse.de> wrote:
> > + *      We are working around a bug present in GCC < 4.6 which prevented
> > + *      it from recognizing anonymous structs and unions.
> > + *      See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4784
> > + */
> > +typedef struct __attribute__ ((__packed__)) ws_header_s {
> 
> Please use QEMU_PACKED.
> 
> > +    unsigned char b0;
> > +    unsigned char b1;
> > +    union {
> > +        struct __attribute__ ((__packed__)) {
> 
> I think individual items inside a packed struct are automatically packed.
According to
http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/Type-Attributes.html the
packed attribute should work like you suggest but if I don't add
QEMU_PACKED to the member structs too I get decoding issues.

I have incorporated everything else in my new patch set but am going to
wait for more feedback.

Regards
Tim


-- 
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix
Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstr. 5, 90409 Nürnberg, Germany
T: +49 (0) 911 74053-0  F: +49 (0) 911 74053-483
http://www.suse.de/

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to