Commit 7e50bbb
ext4: avoid -Wflex-array-member-not-at-end warning
-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 warning:
fs/ext4/mballoc.c:3041: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]>
Reviewed-by: Kees Cook <[email protected]>
Link: https://patch.msgid.link/Z-SF97N3AxcIMlSi@kspp
Signed-off-by: Theodore Ts'o <[email protected]>1 parent ce7e8a6 commit 7e50bbb
1 file changed
+8
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3037 | 3037 | | |
3038 | 3038 | | |
3039 | 3039 | | |
3040 | | - | |
3041 | | - | |
3042 | | - | |
3043 | | - | |
| 3040 | + | |
| 3041 | + | |
3044 | 3042 | | |
3045 | 3043 | | |
3046 | 3044 | | |
3047 | 3045 | | |
3048 | 3046 | | |
3049 | 3047 | | |
3050 | 3048 | | |
3051 | | - | |
| 3049 | + | |
3052 | 3050 | | |
3053 | 3051 | | |
3054 | 3052 | | |
| |||
3068 | 3066 | | |
3069 | 3067 | | |
3070 | 3068 | | |
3071 | | - | |
3072 | | - | |
3073 | | - | |
| 3069 | + | |
| 3070 | + | |
| 3071 | + | |
3074 | 3072 | | |
3075 | 3073 | | |
3076 | | - | |
| 3074 | + | |
3077 | 3075 | | |
3078 | | - | |
| 3076 | + | |
3079 | 3077 | | |
3080 | 3078 | | |
3081 | 3079 | | |
| |||
0 commit comments