diff options
author | Jan Blunck <jblunck@suse.de> | 2006-01-08 04:05:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:14:07 -0500 |
commit | 6a878184c202395ea17212f111ab9ec4b5f6d6ee (patch) | |
tree | 7a4143652fcb41693af44963b7e94b334dd94f54 /include/linux/ncp.h | |
parent | d8a33496671e4533aed090793436d58debea6f3a (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/linux/ncp.h')
-rw-r--r-- | include/linux/ncp.h | 126 |
1 files changed, 63 insertions, 63 deletions
diff --git a/include/linux/ncp.h b/include/linux/ncp.h index 99f77876b716..99f0adeeb3f3 100644 --- a/include/linux/ncp.h +++ b/include/linux/ncp.h | |||
@@ -20,29 +20,29 @@ | |||
20 | #define NCP_DEALLOC_SLOT_REQUEST (0x5555) | 20 | #define NCP_DEALLOC_SLOT_REQUEST (0x5555) |
21 | 21 | ||
22 | struct ncp_request_header { | 22 | struct ncp_request_header { |
23 | __u16 type __attribute__((packed)); | 23 | __u16 type; |
24 | __u8 sequence __attribute__((packed)); | 24 | __u8 sequence; |
25 | __u8 conn_low __attribute__((packed)); | 25 | __u8 conn_low; |
26 | __u8 task __attribute__((packed)); | 26 | __u8 task; |
27 | __u8 conn_high __attribute__((packed)); | 27 | __u8 conn_high; |
28 | __u8 function __attribute__((packed)); | 28 | __u8 function; |
29 | __u8 data[0] __attribute__((packed)); | 29 | __u8 data[0]; |
30 | }; | 30 | } __attribute__((packed)); |
31 | 31 | ||
32 | #define NCP_REPLY (0x3333) | 32 | #define NCP_REPLY (0x3333) |
33 | #define NCP_WATCHDOG (0x3E3E) | 33 | #define NCP_WATCHDOG (0x3E3E) |
34 | #define NCP_POSITIVE_ACK (0x9999) | 34 | #define NCP_POSITIVE_ACK (0x9999) |
35 | 35 | ||
36 | struct ncp_reply_header { | 36 | struct ncp_reply_header { |
37 | __u16 type __attribute__((packed)); | 37 | __u16 type; |
38 | __u8 sequence __attribute__((packed)); | 38 | __u8 sequence; |
39 | __u8 conn_low __attribute__((packed)); | 39 | __u8 conn_low; |
40 | __u8 task __attribute__((packed)); | 40 | __u8 task; |
41 | __u8 conn_high __attribute__((packed)); | 41 | __u8 conn_high; |
42 | __u8 completion_code __attribute__((packed)); | 42 | __u8 completion_code; |
43 | __u8 connection_state __attribute__((packed)); | 43 | __u8 connection_state; |
44 | __u8 data[0] __attribute__((packed)); | 44 | __u8 data[0]; |
45 | }; | 45 | } __attribute__((packed)); |
46 | 46 | ||
47 | #define NCP_VOLNAME_LEN (16) | 47 | #define NCP_VOLNAME_LEN (16) |
48 | #define NCP_NUMBER_OF_VOLUMES (256) | 48 | #define NCP_NUMBER_OF_VOLUMES (256) |
@@ -128,37 +128,37 @@ struct nw_nfs_info { | |||
128 | }; | 128 | }; |
129 | 129 | ||
130 | struct nw_info_struct { | 130 | struct nw_info_struct { |
131 | __u32 spaceAlloc __attribute__((packed)); | 131 | __u32 spaceAlloc; |
132 | __le32 attributes __attribute__((packed)); | 132 | __le32 attributes; |
133 | __u16 flags __attribute__((packed)); | 133 | __u16 flags; |
134 | __le32 dataStreamSize __attribute__((packed)); | 134 | __le32 dataStreamSize; |
135 | __le32 totalStreamSize __attribute__((packed)); | 135 | __le32 totalStreamSize; |
136 | __u16 numberOfStreams __attribute__((packed)); | 136 | __u16 numberOfStreams; |
137 | __le16 creationTime __attribute__((packed)); | 137 | __le16 creationTime; |
138 | __le16 creationDate __attribute__((packed)); | 138 | __le16 creationDate; |
139 | __u32 creatorID __attribute__((packed)); | 139 | __u32 creatorID; |
140 | __le16 modifyTime __attribute__((packed)); | 140 | __le16 modifyTime; |
141 | __le16 modifyDate __attribute__((packed)); | 141 | __le16 modifyDate; |
142 | __u32 modifierID __attribute__((packed)); | 142 | __u32 modifierID; |
143 | __le16 lastAccessDate __attribute__((packed)); | 143 | __le16 lastAccessDate; |
144 | __u16 archiveTime __attribute__((packed)); | 144 | __u16 archiveTime; |
145 | __u16 archiveDate __attribute__((packed)); | 145 | __u16 archiveDate; |
146 | __u32 archiverID __attribute__((packed)); | 146 | __u32 archiverID; |
147 | __u16 inheritedRightsMask __attribute__((packed)); | 147 | __u16 inheritedRightsMask; |
148 | __le32 dirEntNum __attribute__((packed)); | 148 | __le32 dirEntNum; |
149 | __le32 DosDirNum __attribute__((packed)); | 149 | __le32 DosDirNum; |
150 | __u32 volNumber __attribute__((packed)); | 150 | __u32 volNumber; |
151 | __u32 EADataSize __attribute__((packed)); | 151 | __u32 EADataSize; |
152 | __u32 EAKeyCount __attribute__((packed)); | 152 | __u32 EAKeyCount; |
153 | __u32 EAKeySize __attribute__((packed)); | 153 | __u32 EAKeySize; |
154 | __u32 NSCreator __attribute__((packed)); | 154 | __u32 NSCreator; |
155 | __u8 nameLen __attribute__((packed)); | 155 | __u8 nameLen; |
156 | __u8 entryName[256] __attribute__((packed)); | 156 | __u8 entryName[256]; |
157 | /* libncp may depend on there being nothing after entryName */ | 157 | /* libncp may depend on there being nothing after entryName */ |
158 | #ifdef __KERNEL__ | 158 | #ifdef __KERNEL__ |
159 | struct nw_nfs_info nfs; | 159 | struct nw_nfs_info nfs; |
160 | #endif | 160 | #endif |
161 | }; | 161 | } __attribute__((packed)); |
162 | 162 | ||
163 | /* modify mask - use with MODIFY_DOS_INFO structure */ | 163 | /* modify mask - use with MODIFY_DOS_INFO structure */ |
164 | #define DM_ATTRIBUTES (cpu_to_le32(0x02)) | 164 | #define DM_ATTRIBUTES (cpu_to_le32(0x02)) |
@@ -176,26 +176,26 @@ struct nw_info_struct { | |||
176 | #define DM_MAXIMUM_SPACE (cpu_to_le32(0x2000)) | 176 | #define DM_MAXIMUM_SPACE (cpu_to_le32(0x2000)) |
177 | 177 | ||
178 | struct nw_modify_dos_info { | 178 | struct nw_modify_dos_info { |
179 | __le32 attributes __attribute__((packed)); | 179 | __le32 attributes; |
180 | __le16 creationDate __attribute__((packed)); | 180 | __le16 creationDate; |
181 | __le16 creationTime __attribute__((packed)); | 181 | __le16 creationTime; |
182 | __u32 creatorID __attribute__((packed)); | 182 | __u32 creatorID; |
183 | __le16 modifyDate __attribute__((packed)); | 183 | __le16 modifyDate; |
184 | __le16 modifyTime __attribute__((packed)); | 184 | __le16 modifyTime; |
185 | __u32 modifierID __attribute__((packed)); | 185 | __u32 modifierID; |
186 | __u16 archiveDate __attribute__((packed)); | 186 | __u16 archiveDate; |
187 | __u16 archiveTime __attribute__((packed)); | 187 | __u16 archiveTime; |
188 | __u32 archiverID __attribute__((packed)); | 188 | __u32 archiverID; |
189 | __le16 lastAccessDate __attribute__((packed)); | 189 | __le16 lastAccessDate; |
190 | __u16 inheritanceGrantMask __attribute__((packed)); | 190 | __u16 inheritanceGrantMask; |
191 | __u16 inheritanceRevokeMask __attribute__((packed)); | 191 | __u16 inheritanceRevokeMask; |
192 | __u32 maximumSpace __attribute__((packed)); | 192 | __u32 maximumSpace; |
193 | }; | 193 | } __attribute__((packed)); |
194 | 194 | ||
195 | struct nw_search_sequence { | 195 | struct nw_search_sequence { |
196 | __u8 volNumber __attribute__((packed)); | 196 | __u8 volNumber; |
197 | __u32 dirBase __attribute__((packed)); | 197 | __u32 dirBase; |
198 | __u32 sequence __attribute__((packed)); | 198 | __u32 sequence; |
199 | }; | 199 | } __attribute__((packed)); |
200 | 200 | ||
201 | #endif /* _LINUX_NCP_H */ | 201 | #endif /* _LINUX_NCP_H */ |