]> git.ipfire.org Git - ipfire-3.x.git/blame - elfutils/patches/elfutils-0.166-elfcmp-comp-gcc6.patch
pcengines-firmware: update to 4.9.0.7
[ipfire-3.x.git] / elfutils / patches / elfutils-0.166-elfcmp-comp-gcc6.patch
CommitLineData
b97bcea7
MT
1From 836a16fe5b5bab4a3afe2c991c104652775ce3a3 Mon Sep 17 00:00:00 2001
2From: David Abdurachmanov <davidlt@cern.ch>
3Date: Mon, 11 Apr 2016 16:00:57 +0200
4Subject: [PATCH] elfcmp: fix self-comparison error with GCC 6
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Noticed with Fedora 24 Alpha, gcc (GCC) 6.0.0 20160406
10(Red Hat 6.0.0-0.20).
11
12elfcmp.c: In function ‘main’:
13elfcmp.c:364:199: error: self-comparison always evaluates
14to false [-Werror=tautological-compare]
15 if (unlikely (name1 == NULL || name2 == NULL
16
17Signed-off-by: David Abdurachmanov <davidlt@cern.ch>
18---
19 src/ChangeLog | 4 ++++
20 src/elfcmp.c | 2 +-
21 2 files changed, 5 insertions(+), 1 deletion(-)
22
23diff --git a/src/ChangeLog b/src/ChangeLog
24index f74b5dc..bdc9d13 100644
25--- a/src/ChangeLog
26+++ b/src/ChangeLog
27@@ -1,3 +1,7 @@
28+2016-04-11 David Abdurachmanov <davidlt@cern.ch>
29+
30+ * elfcmp.c (main): Fix self-comparison error with GCC 6.
31+
32 2016-03-21 Mark Wielaard <mjw@redhat.com>
33
34 * nm.c (show_symbols): Check for malloc size argument overflow.
35diff --git a/src/elfcmp.c b/src/elfcmp.c
36index 852b92f..7b5d39c 100644
37--- a/src/elfcmp.c
38+++ b/src/elfcmp.c
39@@ -368,7 +368,7 @@ main (int argc, char *argv[])
40 && sym1->st_shndx != SHN_UNDEF)
41 || sym1->st_info != sym2->st_info
42 || sym1->st_other != sym2->st_other
43- || sym1->st_shndx != sym1->st_shndx))
44+ || sym1->st_shndx != sym2->st_shndx))
45 {
46 // XXX Do we want to allow reordered symbol tables?
47 symtab_mismatch:
48--
491.8.3.1
50