qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/3] vnc: added initial websocket protocol suppo


From: Tim Hardeck
Subject: Re: [Qemu-devel] [PATCH 2/3] vnc: added initial websocket protocol support
Date: Sat, 05 Jan 2013 19:02:49 +0100

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 <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]