[PATCH] Eliminate __attribute__ ((packed)) warnings for gcc-4.1

Since version 4.1 the gcc is warning about ignored attributes. This patch is
using the equivalent attribute on the struct instead of on each of the
structure or union members.

GCC Manual:
  "Specifying Attributes of Types

   packed
    This attribute, attached to struct or union type definition, specifies
    that
    each member of the structure or union is placed to minimize the memory
    required. When attached to an enum definition, it indicates that the
    smallest integral type should be used.

    Specifying this attribute for struct and union types is equivalent to
    specifying the packed attribute on each of the structure or union
    members."

Signed-off-by: Jan Blunck <jblunck@suse.de>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Jan Blunck 2006-01-08 01:05:07 -08:00 committed by Linus Torvalds
parent d8a3349667
commit 6a878184c2
15 changed files with 335 additions and 335 deletions

View file

@ -131,17 +131,17 @@ struct frad_conf
/* these are the fields of an RFC 1490 header */
struct frhdr
{
unsigned char control __attribute__((packed));
unsigned char control;
/* for IP packets, this can be the NLPID */
unsigned char pad __attribute__((packed));
unsigned char pad;
unsigned char NLPID __attribute__((packed));
unsigned char OUI[3] __attribute__((packed));
unsigned short PID __attribute__((packed));
unsigned char NLPID;
unsigned char OUI[3];
unsigned short PID;
#define IP_NLPID pad
};
} __attribute__((packed));
/* see RFC 1490 for the definition of the following */
#define FRAD_I_UI 0x03