lkml.org 
[lkml]   [2006]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] Eliminate __attribute__ ((packed)) warnings for gcc-4.1
On Tue, Jan 03, 2006 at 12:30:45PM +0100, Jan Blunck wrote:
> typedef struct T30_s {
> /* session parameters */
> - __u8 resolution __attribute__ ((packed));
> - __u8 rate __attribute__ ((packed));
> - __u8 width __attribute__ ((packed));
> - __u8 length __attribute__ ((packed));
> - __u8 compression __attribute__ ((packed));
> - __u8 ecm __attribute__ ((packed));
> - __u8 binary __attribute__ ((packed));
> - __u8 scantime __attribute__ ((packed));
> - __u8 id[FAXIDLEN] __attribute__ ((packed));
> + __u8 resolution;
> + __u8 rate ;
> + __u8 width ;
> + __u8 length ;
> + __u8 compression ;
> + __u8 ecm ;
> + __u8 binary ;
> + __u8 scantime ;
> + __u8 id[FAXIDLEN] ;

What's with the funky placement of ; ?
The rest of the struct looks sensible.

>
> /* various cruft */
> - u32 dataA[6] __attribute((packed));
> - u16 dataB[5] __attribute((packed));
> - u32 dataC[14] __attribute((packed));
> -};
> + u32 dataA[6];
> + u16 dataB[5];
> + u32 dataC[14];
> +} __attribute((packed));

You could fix the horked indentation at the same time.
(This crops up in a few places in this diff)

Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-04 03:28    [W:0.051 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site