From 6a878184c202395ea17212f111ab9ec4b5f6d6ee Mon Sep 17 00:00:00 2001 From: Jan Blunck Date: Sun, 8 Jan 2006 01:05:07 -0800 Subject: [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 Cc: Dave Jones Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/net/dn_nsp.h | 74 ++++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'include/net/dn_nsp.h') diff --git a/include/net/dn_nsp.h b/include/net/dn_nsp.h index 1ba03be0af3a..e6182b86262b 100644 --- a/include/net/dn_nsp.h +++ b/include/net/dn_nsp.h @@ -72,78 +72,78 @@ extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int nobl struct nsp_data_seg_msg { - unsigned char msgflg __attribute__((packed)); - unsigned short dstaddr __attribute__((packed)); - unsigned short srcaddr __attribute__((packed)); -}; + unsigned char msgflg; + unsigned short dstaddr; + unsigned short srcaddr; +} __attribute__((packed)); struct nsp_data_opt_msg { - unsigned short acknum __attribute__((packed)); - unsigned short segnum __attribute__((packed)); - unsigned short lsflgs __attribute__((packed)); -}; + unsigned short acknum; + unsigned short segnum; + unsigned short lsflgs; +} __attribute__((packed)); struct nsp_data_opt_msg1 { - unsigned short acknum __attribute__((packed)); - unsigned short segnum __attribute__((packed)); -}; + unsigned short acknum; + unsigned short segnum; +} __attribute__((packed)); /* Acknowledgment Message (data/other data) */ struct nsp_data_ack_msg { - unsigned char msgflg __attribute__((packed)); - unsigned short dstaddr __attribute__((packed)); - unsigned short srcaddr __attribute__((packed)); - unsigned short acknum __attribute__((packed)); -}; + unsigned char msgflg; + unsigned short dstaddr; + unsigned short srcaddr; + unsigned short acknum; +} __attribute__((packed)); /* Connect Acknowledgment Message */ struct nsp_conn_ack_msg { - unsigned char msgflg __attribute__((packed)); - unsigned short dstaddr __attribute__((packed)); -}; + unsigned char msgflg; + unsigned short dstaddr; +} __attribute__((packed)); /* Connect Initiate/Retransmit Initiate/Connect Confirm */ struct nsp_conn_init_msg { - unsigned char msgflg __attribute__((packed)); + unsigned char msgflg; #define NSP_CI 0x18 /* Connect Initiate */ #define NSP_RCI 0x68 /* Retrans. Conn Init */ - unsigned short dstaddr __attribute__((packed)); - unsigned short srcaddr __attribute__((packed)); - unsigned char services __attribute__((packed)); + unsigned short dstaddr; + unsigned short srcaddr; + unsigned char services; #define NSP_FC_NONE 0x00 /* Flow Control None */ #define NSP_FC_SRC 0x04 /* Seg Req. Count */ #define NSP_FC_SCMC 0x08 /* Sess. Control Mess */ #define NSP_FC_MASK 0x0c /* FC type mask */ - unsigned char info __attribute__((packed)); - unsigned short segsize __attribute__((packed)); -}; + unsigned char info; + unsigned short segsize; +} __attribute__((packed)); /* Disconnect Initiate/Disconnect Confirm */ struct nsp_disconn_init_msg { - unsigned char msgflg __attribute__((packed)); - unsigned short dstaddr __attribute__((packed)); - unsigned short srcaddr __attribute__((packed)); - unsigned short reason __attribute__((packed)); -}; + unsigned char msgflg; + unsigned short dstaddr; + unsigned short srcaddr; + unsigned short reason; +} __attribute__((packed)); struct srcobj_fmt { - char format __attribute__((packed)); - unsigned char task __attribute__((packed)); - unsigned short grpcode __attribute__((packed)); - unsigned short usrcode __attribute__((packed)); - char dlen __attribute__((packed)); -}; + char format; + unsigned char task; + unsigned short grpcode; + unsigned short usrcode; + char dlen; +} __attribute__((packed)); /* * A collection of functions for manipulating the sequence -- cgit v1.2.3