aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJan Blunck <jblunck@suse.de>2006-01-08 04:05:07 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-08 23:14:07 -0500
commit6a878184c202395ea17212f111ab9ec4b5f6d6ee (patch)
tree7a4143652fcb41693af44963b7e94b334dd94f54 /include/net
parentd8a33496671e4533aed090793436d58debea6f3a (diff)
[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>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/dn_dev.h84
-rw-r--r--include/net/dn_nsp.h74
2 files changed, 79 insertions, 79 deletions
diff --git a/include/net/dn_dev.h b/include/net/dn_dev.h
index 86e8e86e624a..5a86e78081bf 100644
--- a/include/net/dn_dev.h
+++ b/include/net/dn_dev.h
@@ -88,8 +88,8 @@ struct dn_dev {
88 struct net_device *dev; 88 struct net_device *dev;
89 struct dn_dev_parms parms; 89 struct dn_dev_parms parms;
90 char use_long; 90 char use_long;
91 struct timer_list timer; 91 struct timer_list timer;
92 unsigned long t3; 92 unsigned long t3;
93 struct neigh_parms *neigh_parms; 93 struct neigh_parms *neigh_parms;
94 unsigned char addr[ETH_ALEN]; 94 unsigned char addr[ETH_ALEN];
95 struct neighbour *router; /* Default router on circuit */ 95 struct neighbour *router; /* Default router on circuit */
@@ -99,57 +99,57 @@ struct dn_dev {
99 99
100struct dn_short_packet 100struct dn_short_packet
101{ 101{
102 unsigned char msgflg __attribute__((packed)); 102 unsigned char msgflg;
103 unsigned short dstnode __attribute__((packed)); 103 unsigned short dstnode;
104 unsigned short srcnode __attribute__((packed)); 104 unsigned short srcnode;
105 unsigned char forward __attribute__((packed)); 105 unsigned char forward;
106}; 106} __attribute__((packed));
107 107
108struct dn_long_packet 108struct dn_long_packet
109{ 109{
110 unsigned char msgflg __attribute__((packed)); 110 unsigned char msgflg;
111 unsigned char d_area __attribute__((packed)); 111 unsigned char d_area;
112 unsigned char d_subarea __attribute__((packed)); 112 unsigned char d_subarea;
113 unsigned char d_id[6] __attribute__((packed)); 113 unsigned char d_id[6];
114 unsigned char s_area __attribute__((packed)); 114 unsigned char s_area;
115 unsigned char s_subarea __attribute__((packed)); 115 unsigned char s_subarea;
116 unsigned char s_id[6] __attribute__((packed)); 116 unsigned char s_id[6];
117 unsigned char nl2 __attribute__((packed)); 117 unsigned char nl2;
118 unsigned char visit_ct __attribute__((packed)); 118 unsigned char visit_ct;
119 unsigned char s_class __attribute__((packed)); 119 unsigned char s_class;
120 unsigned char pt __attribute__((packed)); 120 unsigned char pt;
121}; 121} __attribute__((packed));
122 122
123/*------------------------- DRP - Routing messages ---------------------*/ 123/*------------------------- DRP - Routing messages ---------------------*/
124 124
125struct endnode_hello_message 125struct endnode_hello_message
126{ 126{
127 unsigned char msgflg __attribute__((packed)); 127 unsigned char msgflg;
128 unsigned char tiver[3] __attribute__((packed)); 128 unsigned char tiver[3];
129 unsigned char id[6] __attribute__((packed)); 129 unsigned char id[6];
130 unsigned char iinfo __attribute__((packed)); 130 unsigned char iinfo;
131 unsigned short blksize __attribute__((packed)); 131 unsigned short blksize;
132 unsigned char area __attribute__((packed)); 132 unsigned char area;
133 unsigned char seed[8] __attribute__((packed)); 133 unsigned char seed[8];
134 unsigned char neighbor[6] __attribute__((packed)); 134 unsigned char neighbor[6];
135 unsigned short timer __attribute__((packed)); 135 unsigned short timer;
136 unsigned char mpd __attribute__((packed)); 136 unsigned char mpd;
137 unsigned char datalen __attribute__((packed)); 137 unsigned char datalen;
138 unsigned char data[2] __attribute__((packed)); 138 unsigned char data[2];
139}; 139} __attribute__((packed));
140 140
141struct rtnode_hello_message 141struct rtnode_hello_message
142{ 142{
143 unsigned char msgflg __attribute__((packed)); 143 unsigned char msgflg;
144 unsigned char tiver[3] __attribute__((packed)); 144 unsigned char tiver[3];
145 unsigned char id[6] __attribute__((packed)); 145 unsigned char id[6];
146 unsigned char iinfo __attribute__((packed)); 146 unsigned char iinfo;
147 unsigned short blksize __attribute__((packed)); 147 unsigned short blksize;
148 unsigned char priority __attribute__((packed)); 148 unsigned char priority;
149 unsigned char area __attribute__((packed)); 149 unsigned char area;
150 unsigned short timer __attribute__((packed)); 150 unsigned short timer;
151 unsigned char mpd __attribute__((packed)); 151 unsigned char mpd;
152}; 152} __attribute__((packed));
153 153
154 154
155extern void dn_dev_init(void); 155extern void dn_dev_init(void);
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
72 72
73struct nsp_data_seg_msg 73struct nsp_data_seg_msg
74{ 74{
75 unsigned char msgflg __attribute__((packed)); 75 unsigned char msgflg;
76 unsigned short dstaddr __attribute__((packed)); 76 unsigned short dstaddr;
77 unsigned short srcaddr __attribute__((packed)); 77 unsigned short srcaddr;
78}; 78} __attribute__((packed));
79 79
80struct nsp_data_opt_msg 80struct nsp_data_opt_msg
81{ 81{
82 unsigned short acknum __attribute__((packed)); 82 unsigned short acknum;
83 unsigned short segnum __attribute__((packed)); 83 unsigned short segnum;
84 unsigned short lsflgs __attribute__((packed)); 84 unsigned short lsflgs;
85}; 85} __attribute__((packed));
86 86
87struct nsp_data_opt_msg1 87struct nsp_data_opt_msg1
88{ 88{
89 unsigned short acknum __attribute__((packed)); 89 unsigned short acknum;
90 unsigned short segnum __attribute__((packed)); 90 unsigned short segnum;
91}; 91} __attribute__((packed));
92 92
93 93
94/* Acknowledgment Message (data/other data) */ 94/* Acknowledgment Message (data/other data) */
95struct nsp_data_ack_msg 95struct nsp_data_ack_msg
96{ 96{
97 unsigned char msgflg __attribute__((packed)); 97 unsigned char msgflg;
98 unsigned short dstaddr __attribute__((packed)); 98 unsigned short dstaddr;
99 unsigned short srcaddr __attribute__((packed)); 99 unsigned short srcaddr;
100 unsigned short acknum __attribute__((packed)); 100 unsigned short acknum;
101}; 101} __attribute__((packed));
102 102
103/* Connect Acknowledgment Message */ 103/* Connect Acknowledgment Message */
104struct nsp_conn_ack_msg 104struct nsp_conn_ack_msg
105{ 105{
106 unsigned char msgflg __attribute__((packed)); 106 unsigned char msgflg;
107 unsigned short dstaddr __attribute__((packed)); 107 unsigned short dstaddr;
108}; 108} __attribute__((packed));
109 109
110 110
111/* Connect Initiate/Retransmit Initiate/Connect Confirm */ 111/* Connect Initiate/Retransmit Initiate/Connect Confirm */
112struct nsp_conn_init_msg 112struct nsp_conn_init_msg
113{ 113{
114 unsigned char msgflg __attribute__((packed)); 114 unsigned char msgflg;
115#define NSP_CI 0x18 /* Connect Initiate */ 115#define NSP_CI 0x18 /* Connect Initiate */
116#define NSP_RCI 0x68 /* Retrans. Conn Init */ 116#define NSP_RCI 0x68 /* Retrans. Conn Init */
117 unsigned short dstaddr __attribute__((packed)); 117 unsigned short dstaddr;
118 unsigned short srcaddr __attribute__((packed)); 118 unsigned short srcaddr;
119 unsigned char services __attribute__((packed)); 119 unsigned char services;
120#define NSP_FC_NONE 0x00 /* Flow Control None */ 120#define NSP_FC_NONE 0x00 /* Flow Control None */
121#define NSP_FC_SRC 0x04 /* Seg Req. Count */ 121#define NSP_FC_SRC 0x04 /* Seg Req. Count */
122#define NSP_FC_SCMC 0x08 /* Sess. Control Mess */ 122#define NSP_FC_SCMC 0x08 /* Sess. Control Mess */
123#define NSP_FC_MASK 0x0c /* FC type mask */ 123#define NSP_FC_MASK 0x0c /* FC type mask */
124 unsigned char info __attribute__((packed)); 124 unsigned char info;
125 unsigned short segsize __attribute__((packed)); 125 unsigned short segsize;
126}; 126} __attribute__((packed));
127 127
128/* Disconnect Initiate/Disconnect Confirm */ 128/* Disconnect Initiate/Disconnect Confirm */
129struct nsp_disconn_init_msg 129struct nsp_disconn_init_msg
130{ 130{
131 unsigned char msgflg __attribute__((packed)); 131 unsigned char msgflg;
132 unsigned short dstaddr __attribute__((packed)); 132 unsigned short dstaddr;
133 unsigned short srcaddr __attribute__((packed)); 133 unsigned short srcaddr;
134 unsigned short reason __attribute__((packed)); 134 unsigned short reason;
135}; 135} __attribute__((packed));
136 136
137 137
138 138
139struct srcobj_fmt 139struct srcobj_fmt
140{ 140{
141 char format __attribute__((packed)); 141 char format;
142 unsigned char task __attribute__((packed)); 142 unsigned char task;
143 unsigned short grpcode __attribute__((packed)); 143 unsigned short grpcode;
144 unsigned short usrcode __attribute__((packed)); 144 unsigned short usrcode;
145 char dlen __attribute__((packed)); 145 char dlen;
146}; 146} __attribute__((packed));
147 147
148/* 148/*
149 * A collection of functions for manipulating the sequence 149 * A collection of functions for manipulating the sequence