diff options
author | Danny Kukawka <danny.kukawka@bisect.de> | 2012-02-01 22:20:28 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-02 16:47:41 -0500 |
commit | e1f4c485cdb2b1d7aae172b731f6c2b403381ebb (patch) | |
tree | 9e4a8024f8144479295658bb31252a349195cdcc /drivers/isdn/hardware | |
parent | 87e7597b5a3f99238d95d63c44c9f872a41b37ae (diff) |
eicon: fix -Warray-bounds warning
Fix for a -Warray-bounds warning. mixer_notify_update() tries to
write to ((CAPI_MSG *) msg)->info.facility_req.structs[3] while
structs is defined as byte structs[1]. Set all 'structs' which are
part of the typdefs in the info union to 'byte structs[0]'.
v2: set all info.*.structs to byte structs[0]
Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/hardware')
-rw-r--r-- | drivers/isdn/hardware/eicon/capi20.h | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/drivers/isdn/hardware/eicon/capi20.h b/drivers/isdn/hardware/eicon/capi20.h index 7ebcccda74d8..27ecd61888de 100644 --- a/drivers/isdn/hardware/eicon/capi20.h +++ b/drivers/isdn/hardware/eicon/capi20.h | |||
@@ -117,7 +117,7 @@ typedef struct api_profile_s { | |||
117 | /*------------------------------------------------------------------*/ | 117 | /*------------------------------------------------------------------*/ |
118 | /* ALERT-REQUEST */ | 118 | /* ALERT-REQUEST */ |
119 | typedef struct { | 119 | typedef struct { |
120 | byte structs[1]; /* Additional Info */ | 120 | byte structs[0]; /* Additional Info */ |
121 | } _ALT_REQP; | 121 | } _ALT_REQP; |
122 | /* ALERT-CONFIRM */ | 122 | /* ALERT-CONFIRM */ |
123 | typedef struct { | 123 | typedef struct { |
@@ -126,7 +126,7 @@ typedef struct { | |||
126 | /* CONNECT-REQUEST */ | 126 | /* CONNECT-REQUEST */ |
127 | typedef struct { | 127 | typedef struct { |
128 | word CIP_Value; | 128 | word CIP_Value; |
129 | byte structs[1]; /* Called party number, | 129 | byte structs[0]; /* Called party number, |
130 | Called party subaddress, | 130 | Called party subaddress, |
131 | Calling party number, | 131 | Calling party number, |
132 | Calling party subaddress, | 132 | Calling party subaddress, |
@@ -143,7 +143,7 @@ typedef struct { | |||
143 | /* CONNECT-INDICATION */ | 143 | /* CONNECT-INDICATION */ |
144 | typedef struct { | 144 | typedef struct { |
145 | word CIP_Value; | 145 | word CIP_Value; |
146 | byte structs[1]; /* Called party number, | 146 | byte structs[0]; /* Called party number, |
147 | Called party subaddress, | 147 | Called party subaddress, |
148 | Calling party number, | 148 | Calling party number, |
149 | Calling party subaddress, | 149 | Calling party subaddress, |
@@ -155,24 +155,24 @@ typedef struct { | |||
155 | /* CONNECT-RESPONSE */ | 155 | /* CONNECT-RESPONSE */ |
156 | typedef struct { | 156 | typedef struct { |
157 | word Accept; | 157 | word Accept; |
158 | byte structs[1]; /* B_protocol, | 158 | byte structs[0]; /* B_protocol, |
159 | Connected party number, | 159 | Connected party number, |
160 | Connected party subaddress, | 160 | Connected party subaddress, |
161 | LLC */ | 161 | LLC */ |
162 | } _CON_RESP; | 162 | } _CON_RESP; |
163 | /* CONNECT-ACTIVE-INDICATION */ | 163 | /* CONNECT-ACTIVE-INDICATION */ |
164 | typedef struct { | 164 | typedef struct { |
165 | byte structs[1]; /* Connected party number, | 165 | byte structs[0]; /* Connected party number, |
166 | Connected party subaddress, | 166 | Connected party subaddress, |
167 | LLC */ | 167 | LLC */ |
168 | } _CON_A_INDP; | 168 | } _CON_A_INDP; |
169 | /* CONNECT-ACTIVE-RESPONSE */ | 169 | /* CONNECT-ACTIVE-RESPONSE */ |
170 | typedef struct { | 170 | typedef struct { |
171 | byte structs[1]; /* empty */ | 171 | byte structs[0]; /* empty */ |
172 | } _CON_A_RESP; | 172 | } _CON_A_RESP; |
173 | /* DISCONNECT-REQUEST */ | 173 | /* DISCONNECT-REQUEST */ |
174 | typedef struct { | 174 | typedef struct { |
175 | byte structs[1]; /* Additional Info */ | 175 | byte structs[0]; /* Additional Info */ |
176 | } _DIS_REQP; | 176 | } _DIS_REQP; |
177 | /* DISCONNECT-CONFIRM */ | 177 | /* DISCONNECT-CONFIRM */ |
178 | typedef struct { | 178 | typedef struct { |
@@ -184,13 +184,13 @@ typedef struct { | |||
184 | } _DIS_INDP; | 184 | } _DIS_INDP; |
185 | /* DISCONNECT-RESPONSE */ | 185 | /* DISCONNECT-RESPONSE */ |
186 | typedef struct { | 186 | typedef struct { |
187 | byte structs[1]; /* empty */ | 187 | byte structs[0]; /* empty */ |
188 | } _DIS_RESP; | 188 | } _DIS_RESP; |
189 | /* LISTEN-REQUEST */ | 189 | /* LISTEN-REQUEST */ |
190 | typedef struct { | 190 | typedef struct { |
191 | dword Info_Mask; | 191 | dword Info_Mask; |
192 | dword CIP_Mask; | 192 | dword CIP_Mask; |
193 | byte structs[1]; /* Calling party number, | 193 | byte structs[0]; /* Calling party number, |
194 | Calling party subaddress */ | 194 | Calling party subaddress */ |
195 | } _LIS_REQP; | 195 | } _LIS_REQP; |
196 | /* LISTEN-CONFIRM */ | 196 | /* LISTEN-CONFIRM */ |
@@ -199,7 +199,7 @@ typedef struct { | |||
199 | } _LIS_CONP; | 199 | } _LIS_CONP; |
200 | /* INFO-REQUEST */ | 200 | /* INFO-REQUEST */ |
201 | typedef struct { | 201 | typedef struct { |
202 | byte structs[1]; /* Called party number, | 202 | byte structs[0]; /* Called party number, |
203 | Additional Info */ | 203 | Additional Info */ |
204 | } _INF_REQP; | 204 | } _INF_REQP; |
205 | /* INFO-CONFIRM */ | 205 | /* INFO-CONFIRM */ |
@@ -209,15 +209,15 @@ typedef struct { | |||
209 | /* INFO-INDICATION */ | 209 | /* INFO-INDICATION */ |
210 | typedef struct { | 210 | typedef struct { |
211 | word Number; | 211 | word Number; |
212 | byte structs[1]; /* Info element */ | 212 | byte structs[0]; /* Info element */ |
213 | } _INF_INDP; | 213 | } _INF_INDP; |
214 | /* INFO-RESPONSE */ | 214 | /* INFO-RESPONSE */ |
215 | typedef struct { | 215 | typedef struct { |
216 | byte structs[1]; /* empty */ | 216 | byte structs[0]; /* empty */ |
217 | } _INF_RESP; | 217 | } _INF_RESP; |
218 | /* SELECT-B-REQUEST */ | 218 | /* SELECT-B-REQUEST */ |
219 | typedef struct { | 219 | typedef struct { |
220 | byte structs[1]; /* B-protocol */ | 220 | byte structs[0]; /* B-protocol */ |
221 | } _SEL_B_REQP; | 221 | } _SEL_B_REQP; |
222 | /* SELECT-B-CONFIRM */ | 222 | /* SELECT-B-CONFIRM */ |
223 | typedef struct { | 223 | typedef struct { |
@@ -226,7 +226,7 @@ typedef struct { | |||
226 | /* FACILITY-REQUEST */ | 226 | /* FACILITY-REQUEST */ |
227 | typedef struct { | 227 | typedef struct { |
228 | word Selector; | 228 | word Selector; |
229 | byte structs[1]; /* Facility parameters */ | 229 | byte structs[0]; /* Facility parameters */ |
230 | } _FAC_REQP; | 230 | } _FAC_REQP; |
231 | /* FACILITY-CONFIRM STRUCT FOR SUPPLEMENT. SERVICES */ | 231 | /* FACILITY-CONFIRM STRUCT FOR SUPPLEMENT. SERVICES */ |
232 | typedef struct { | 232 | typedef struct { |
@@ -240,21 +240,21 @@ typedef struct { | |||
240 | typedef struct { | 240 | typedef struct { |
241 | word Info; | 241 | word Info; |
242 | word Selector; | 242 | word Selector; |
243 | byte structs[1]; /* Facility parameters */ | 243 | byte structs[0]; /* Facility parameters */ |
244 | } _FAC_CONP; | 244 | } _FAC_CONP; |
245 | /* FACILITY-INDICATION */ | 245 | /* FACILITY-INDICATION */ |
246 | typedef struct { | 246 | typedef struct { |
247 | word Selector; | 247 | word Selector; |
248 | byte structs[1]; /* Facility parameters */ | 248 | byte structs[0]; /* Facility parameters */ |
249 | } _FAC_INDP; | 249 | } _FAC_INDP; |
250 | /* FACILITY-RESPONSE */ | 250 | /* FACILITY-RESPONSE */ |
251 | typedef struct { | 251 | typedef struct { |
252 | word Selector; | 252 | word Selector; |
253 | byte structs[1]; /* Facility parameters */ | 253 | byte structs[0]; /* Facility parameters */ |
254 | } _FAC_RESP; | 254 | } _FAC_RESP; |
255 | /* CONNECT-B3-REQUEST */ | 255 | /* CONNECT-B3-REQUEST */ |
256 | typedef struct { | 256 | typedef struct { |
257 | byte structs[1]; /* NCPI */ | 257 | byte structs[0]; /* NCPI */ |
258 | } _CON_B3_REQP; | 258 | } _CON_B3_REQP; |
259 | /* CONNECT-B3-CONFIRM */ | 259 | /* CONNECT-B3-CONFIRM */ |
260 | typedef struct { | 260 | typedef struct { |
@@ -262,24 +262,24 @@ typedef struct { | |||
262 | } _CON_B3_CONP; | 262 | } _CON_B3_CONP; |
263 | /* CONNECT-B3-INDICATION */ | 263 | /* CONNECT-B3-INDICATION */ |
264 | typedef struct { | 264 | typedef struct { |
265 | byte structs[1]; /* NCPI */ | 265 | byte structs[0]; /* NCPI */ |
266 | } _CON_B3_INDP; | 266 | } _CON_B3_INDP; |
267 | /* CONNECT-B3-RESPONSE */ | 267 | /* CONNECT-B3-RESPONSE */ |
268 | typedef struct { | 268 | typedef struct { |
269 | word Accept; | 269 | word Accept; |
270 | byte structs[1]; /* NCPI */ | 270 | byte structs[0]; /* NCPI */ |
271 | } _CON_B3_RESP; | 271 | } _CON_B3_RESP; |
272 | /* CONNECT-B3-ACTIVE-INDICATION */ | 272 | /* CONNECT-B3-ACTIVE-INDICATION */ |
273 | typedef struct { | 273 | typedef struct { |
274 | byte structs[1]; /* NCPI */ | 274 | byte structs[0]; /* NCPI */ |
275 | } _CON_B3_A_INDP; | 275 | } _CON_B3_A_INDP; |
276 | /* CONNECT-B3-ACTIVE-RESPONSE */ | 276 | /* CONNECT-B3-ACTIVE-RESPONSE */ |
277 | typedef struct { | 277 | typedef struct { |
278 | byte structs[1]; /* empty */ | 278 | byte structs[0]; /* empty */ |
279 | } _CON_B3_A_RESP; | 279 | } _CON_B3_A_RESP; |
280 | /* DISCONNECT-B3-REQUEST */ | 280 | /* DISCONNECT-B3-REQUEST */ |
281 | typedef struct { | 281 | typedef struct { |
282 | byte structs[1]; /* NCPI */ | 282 | byte structs[0]; /* NCPI */ |
283 | } _DIS_B3_REQP; | 283 | } _DIS_B3_REQP; |
284 | /* DISCONNECT-B3-CONFIRM */ | 284 | /* DISCONNECT-B3-CONFIRM */ |
285 | typedef struct { | 285 | typedef struct { |
@@ -288,11 +288,11 @@ typedef struct { | |||
288 | /* DISCONNECT-B3-INDICATION */ | 288 | /* DISCONNECT-B3-INDICATION */ |
289 | typedef struct { | 289 | typedef struct { |
290 | word Info; | 290 | word Info; |
291 | byte structs[1]; /* NCPI */ | 291 | byte structs[0]; /* NCPI */ |
292 | } _DIS_B3_INDP; | 292 | } _DIS_B3_INDP; |
293 | /* DISCONNECT-B3-RESPONSE */ | 293 | /* DISCONNECT-B3-RESPONSE */ |
294 | typedef struct { | 294 | typedef struct { |
295 | byte structs[1]; /* empty */ | 295 | byte structs[0]; /* empty */ |
296 | } _DIS_B3_RESP; | 296 | } _DIS_B3_RESP; |
297 | /* DATA-B3-REQUEST */ | 297 | /* DATA-B3-REQUEST */ |
298 | typedef struct { | 298 | typedef struct { |
@@ -335,7 +335,7 @@ typedef struct { | |||
335 | } _DAT_B3_RESP; | 335 | } _DAT_B3_RESP; |
336 | /* RESET-B3-REQUEST */ | 336 | /* RESET-B3-REQUEST */ |
337 | typedef struct { | 337 | typedef struct { |
338 | byte structs[1]; /* NCPI */ | 338 | byte structs[0]; /* NCPI */ |
339 | } _RES_B3_REQP; | 339 | } _RES_B3_REQP; |
340 | /* RESET-B3-CONFIRM */ | 340 | /* RESET-B3-CONFIRM */ |
341 | typedef struct { | 341 | typedef struct { |
@@ -343,20 +343,20 @@ typedef struct { | |||
343 | } _RES_B3_CONP; | 343 | } _RES_B3_CONP; |
344 | /* RESET-B3-INDICATION */ | 344 | /* RESET-B3-INDICATION */ |
345 | typedef struct { | 345 | typedef struct { |
346 | byte structs[1]; /* NCPI */ | 346 | byte structs[0]; /* NCPI */ |
347 | } _RES_B3_INDP; | 347 | } _RES_B3_INDP; |
348 | /* RESET-B3-RESPONSE */ | 348 | /* RESET-B3-RESPONSE */ |
349 | typedef struct { | 349 | typedef struct { |
350 | byte structs[1]; /* empty */ | 350 | byte structs[0]; /* empty */ |
351 | } _RES_B3_RESP; | 351 | } _RES_B3_RESP; |
352 | /* CONNECT-B3-T90-ACTIVE-INDICATION */ | 352 | /* CONNECT-B3-T90-ACTIVE-INDICATION */ |
353 | typedef struct { | 353 | typedef struct { |
354 | byte structs[1]; /* NCPI */ | 354 | byte structs[0]; /* NCPI */ |
355 | } _CON_B3_T90_A_INDP; | 355 | } _CON_B3_T90_A_INDP; |
356 | /* CONNECT-B3-T90-ACTIVE-RESPONSE */ | 356 | /* CONNECT-B3-T90-ACTIVE-RESPONSE */ |
357 | typedef struct { | 357 | typedef struct { |
358 | word Reject; | 358 | word Reject; |
359 | byte structs[1]; /* NCPI */ | 359 | byte structs[0]; /* NCPI */ |
360 | } _CON_B3_T90_A_RESP; | 360 | } _CON_B3_T90_A_RESP; |
361 | /*------------------------------------------------------------------*/ | 361 | /*------------------------------------------------------------------*/ |
362 | /* message structure */ | 362 | /* message structure */ |