Commit 2bd9077
jbd2: avoid dozens of -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 (`struct shash_desc`) where the size of the
flexible-array member (`__ctx`) is known at compile-time, and
refactor the rest of the code, accordingly.
So, with this, fix 77 of the following warnings:
include/linux/jbd2.h:1800:35: 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 <gustavoars@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/ZyU94w0IALVhc9Jy@kspp
Signed-off-by: Theodore Ts'o <tytso@mit.edu>1 parent 6a0c588 commit 2bd9077
1 file changed
Lines changed: 7 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1796 | 1796 | | |
1797 | 1797 | | |
1798 | 1798 | | |
1799 | | - | |
1800 | | - | |
1801 | | - | |
1802 | | - | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
1803 | 1802 | | |
1804 | 1803 | | |
1805 | 1804 | | |
1806 | 1805 | | |
1807 | 1806 | | |
1808 | | - | |
1809 | | - | |
| 1807 | + | |
| 1808 | + | |
1810 | 1809 | | |
1811 | | - | |
| 1810 | + | |
1812 | 1811 | | |
1813 | 1812 | | |
1814 | | - | |
| 1813 | + | |
1815 | 1814 | | |
1816 | 1815 | | |
1817 | 1816 | | |
| |||
0 commit comments