Re: [PATCH 5/6] Werror: Remove the packed attribute fromPofTimStamp_tag in the hysdn driver

From: Andrew Morton
Date: Thu May 29 2008 - 15:25:45 EST


On Thu, 29 May 2008 19:17:46 +0100 David Howells <dhowells@xxxxxxxxxx> wrote:

> Remove the packed attribute from PofTimStamp_tag in the hysdn driver as the
> thing being packed is just an array of chars.

When fixing warnings and build errors, please do quote the compiler
output in the changelog. Ditto sparse, etc.

> Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
> ---
>
> drivers/isdn/hysdn/hysdn_pof.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>
> diff --git a/drivers/isdn/hysdn/hysdn_pof.h b/drivers/isdn/hysdn/hysdn_pof.h
> index a368d6c..3a72b90 100644
> --- a/drivers/isdn/hysdn/hysdn_pof.h
> +++ b/drivers/isdn/hysdn/hysdn_pof.h
> @@ -60,7 +60,7 @@ typedef struct PofRecHdr_tag { /* Pof record header */
>
> typedef struct PofTimeStamp_tag {
> /*00 */ unsigned long UnixTime __attribute__((packed));
> - /*04 */ unsigned char DateTimeText[0x28] __attribute__((packed));
> + /*04 */ unsigned char DateTimeText[0x28];
> /* =40 */
> /*2C */
> } tPofTimeStamp;

I was admiring this the other day. The compiler (my one at least) says

drivers/isdn/hysdn/hysdn_pof.h:63: warning: 'packed' attribute ignored for field of type 'unsigned char[39u]'

39u != 0x28. What's up with that?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/