diff options
| author | Robert Yang <liezhi.yang@windriver.com> | 2015-07-08 00:23:47 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-09 18:00:18 +0100 |
| commit | f9ac3f3e200e4fd0dfe0f45ddc606ce945ea0143 (patch) | |
| tree | 1df34d2b324d1f23a136f58509912ea892311c61 /meta/recipes-devtools/elfutils/elfutils-0.163/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch | |
| parent | d32b383c3a7af0212cf6bfc942f4f8d6ae08d986 (diff) | |
| download | poky-f9ac3f3e200e4fd0dfe0f45ddc606ce945ea0143.tar.gz | |
elfutils: 0.162 -> 0.163
(From OE-Core rev: cb8fc7521cdaaa7b8f82a0c6dfc6526778c99099)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/elfutils/elfutils-0.163/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch')
| -rw-r--r-- | meta/recipes-devtools/elfutils/elfutils-0.163/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-devtools/elfutils/elfutils-0.163/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch b/meta/recipes-devtools/elfutils/elfutils-0.163/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch new file mode 100644 index 0000000000..3754c1c361 --- /dev/null +++ b/meta/recipes-devtools/elfutils/elfutils-0.163/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | From 668accf322fd7185e273bfd50b84320e71d9de5a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 3 | Date: Fri, 10 Apr 2015 00:29:18 +0200 | ||
| 4 | Subject: [PATCH] elf_getarsym: Silence -Werror=maybe-uninitialized false | ||
| 5 | positive | ||
| 6 | |||
| 7 | Upstream-Status: Pending | ||
| 8 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 9 | --- | ||
| 10 | libelf/elf_getarsym.c | 9 +++++++-- | ||
| 11 | 1 file changed, 7 insertions(+), 2 deletions(-) | ||
| 12 | |||
| 13 | diff --git a/libelf/elf_getarsym.c b/libelf/elf_getarsym.c | ||
| 14 | index d0bb28a..08954d2 100644 | ||
| 15 | --- a/libelf/elf_getarsym.c | ||
| 16 | +++ b/libelf/elf_getarsym.c | ||
| 17 | @@ -165,8 +165,13 @@ elf_getarsym (elf, ptr) | ||
| 18 | int w = index64_p ? 8 : 4; | ||
| 19 | |||
| 20 | /* We have an archive. The first word in there is the number of | ||
| 21 | - entries in the table. */ | ||
| 22 | - uint64_t n; | ||
| 23 | + entries in the table. | ||
| 24 | + Set to SIZE_MAX just to silence -Werror=maybe-uninitialized | ||
| 25 | + elf_getarsym.c:290:9: error: 'n' may be used uninitialized in this function | ||
| 26 | + The read_number_entries function doesn't initialize n only when returning | ||
| 27 | + -1 which in turn ensures to jump over usage of this uninitialized variable. | ||
| 28 | + */ | ||
| 29 | + uint64_t n = SIZE_MAX; | ||
| 30 | size_t off = elf->start_offset + SARMAG + sizeof (struct ar_hdr); | ||
| 31 | if (read_number_entries (&n, elf, &off, index64_p) < 0) | ||
| 32 | { | ||
| 33 | -- | ||
| 34 | 2.3.5 | ||
| 35 | |||
