Commit da90147
platform/chrome: cros_ec_debugfs: Avoid -Wflex-array-member-not-at-end warnings
-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.
Use the `DEFINE_RAW_FLEX()` helper for an on-stack definition of
a flexible structure where the size of the flexible-array member
is known at compile-time, and refactor the rest of the code,
accordingly.
So, with these changes, fix the following warnings:
drivers/platform/chrome/cros_ec_debugfs.c:211:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/platform/chrome/cros_ec_debugfs.c:257:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/platform/chrome/cros_ec_debugfs.c:279:40: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
Signed-off-by: Gustavo A. R. Silva <[email protected]>
Link: https://lore.kernel.org/r/Z-aiAAcIP7sBRtz0@kspp
Signed-off-by: Tzung-Bi Shih <[email protected]>1 parent 04251bc commit da90147
1 file changed
+20
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
220 | 217 | | |
221 | 218 | | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | 219 | | |
227 | 220 | | |
228 | 221 | | |
| |||
253 | 246 | | |
254 | 247 | | |
255 | 248 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
| 249 | + | |
| 250 | + | |
260 | 251 | | |
261 | 252 | | |
262 | | - | |
263 | | - | |
| 253 | + | |
| 254 | + | |
264 | 255 | | |
265 | | - | |
266 | | - | |
| 256 | + | |
| 257 | + | |
267 | 258 | | |
268 | 259 | | |
269 | 260 | | |
| |||
275 | 266 | | |
276 | 267 | | |
277 | 268 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
283 | 273 | | |
284 | 274 | | |
285 | 275 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
| 276 | + | |
| 277 | + | |
290 | 278 | | |
291 | | - | |
| 279 | + | |
292 | 280 | | |
293 | 281 | | |
294 | 282 | | |
| |||
0 commit comments