On Thursday 07 August 2008 18:00:57 Chr wrote: > On Thursday 07 August 2008 17:27:14 Johannes Berg wrote: > > On Thu, 2008-08-07 at 17:27 +0200, Chr wrote: > > > + u32:24; > > > + u32:32; > > > + u16:16; > > > > That piece looks just wrong though. Bitfields, and in a hw struct? > well, this is a crude way to silence gcc... without the ":32" > it complains "warning: declaration does not declare anything". > > Of course we/I can make lot's of u8 paddingZ[X] arrays, > but we'll run out of Z and X in the long run ;-). You can use this magic macro: #define P4D_BYT3S(magic, nr_bytes) u8 __p4dding##magic[nr_bytes] #define P4D_BYTES(line, nr_bytes) P4D_BYT3S(line, nr_bytes) /* Magic helper macro to pad structures. Ignore those above. It's magic. */ #define PAD_BYTES(nr_bytes) P4D_BYTES( __LINE__ , (nr_bytes)) struct xyz { //foo PAD_BYTES(4); /* Pad 4 bytes */ //bar }; -- Greetings Michael. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html