Commit df203da
md/raid1: fix error: ISO C90 forbids mixed declarations
There is a compile error when this commit is added:
md: raid1: fix potential OOB in raid1_remove_disk()
drivers/md/raid1.c: In function 'raid1_remove_disk':
drivers/md/raid1.c:1844:9: error: ISO C90 forbids mixed declarations
and code [-Werror=declaration-after-statement]
1844 | struct raid1_info *p = conf->mirrors + number;
| ^~~~~~
That's because the new code was inserted before the struct.
The change is move the struct command above this commit.
Fixes: 8b0472b ("md: raid1: fix potential OOB in raid1_remove_disk()")
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/46d929d0-2aab-4cf2-b2bf-338963e8ba5a@redhat.com1 parent 9989214 commit df203da
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1837 | 1837 | | |
1838 | 1838 | | |
1839 | 1839 | | |
| 1840 | + | |
1840 | 1841 | | |
1841 | 1842 | | |
1842 | 1843 | | |
1843 | 1844 | | |
1844 | | - | |
1845 | | - | |
1846 | 1845 | | |
1847 | 1846 | | |
1848 | 1847 | | |
| |||
0 commit comments