diff options
Diffstat (limited to 'meta/recipes-bsp/grub/files/0001-btrfs-avoid-used-uninitialized-error-with-GCC7.patch')
-rw-r--r-- | meta/recipes-bsp/grub/files/0001-btrfs-avoid-used-uninitialized-error-with-GCC7.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/0001-btrfs-avoid-used-uninitialized-error-with-GCC7.patch b/meta/recipes-bsp/grub/files/0001-btrfs-avoid-used-uninitialized-error-with-GCC7.patch new file mode 100644 index 0000000000..217a775609 --- /dev/null +++ b/meta/recipes-bsp/grub/files/0001-btrfs-avoid-used-uninitialized-error-with-GCC7.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 6cef7f6079550af3bf91dbff824398eaef08c3c5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrei Borzenkov <arvidjaar@gmail.com> | ||
3 | Date: Tue, 4 Apr 2017 19:22:32 +0300 | ||
4 | Subject: [PATCH 1/4] btrfs: avoid "used uninitialized" error with GCC7 | ||
5 | |||
6 | sblock was local and so considered new variable on every loop | ||
7 | iteration. | ||
8 | |||
9 | Closes: 50597 | ||
10 | --- | ||
11 | Upstream-Status: Backport | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | |||
14 | grub-core/fs/btrfs.c | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c | ||
18 | index 9cffa91..4849c1c 100644 | ||
19 | --- a/grub-core/fs/btrfs.c | ||
20 | +++ b/grub-core/fs/btrfs.c | ||
21 | @@ -227,11 +227,11 @@ grub_btrfs_read_logical (struct grub_btrfs_data *data, | ||
22 | static grub_err_t | ||
23 | read_sblock (grub_disk_t disk, struct grub_btrfs_superblock *sb) | ||
24 | { | ||
25 | + struct grub_btrfs_superblock sblock; | ||
26 | unsigned i; | ||
27 | grub_err_t err = GRUB_ERR_NONE; | ||
28 | for (i = 0; i < ARRAY_SIZE (superblock_sectors); i++) | ||
29 | { | ||
30 | - struct grub_btrfs_superblock sblock; | ||
31 | /* Don't try additional superblocks beyond device size. */ | ||
32 | if (i && (grub_le_to_cpu64 (sblock.this_device.size) | ||
33 | >> GRUB_DISK_SECTOR_BITS) <= superblock_sectors[i]) | ||
34 | -- | ||
35 | 1.9.1 | ||
36 | |||