diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-04-21 14:09:47 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-12-09 14:34:35 +0000 |
commit | 250ca947da463841f7c1858c293e17a7e824d637 (patch) | |
tree | ed842d44901af9f987ff769ee9dc36184d2fede9 /meta/recipes-bsp/grub/files/0001-btrfs-avoid-used-uninitialized-error-with-GCC7.patch | |
parent | 666076dfc0528442a1098354dcc5d64672dd38ee (diff) | |
download | poky-250ca947da463841f7c1858c293e17a7e824d637.tar.gz |
grub: Fix build with gcc7
backport patches from upsteam and adapt them to 2.0 codebase
(From OE-Core rev: 347976bf08158d1aa46dfea6f0f9d6dcc0d97395)
(From OE-Core rev: 74da4a06619558b34752d3588fd965a7994106e3)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 | |||