From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============2918217631570488410==" MIME-Version: 1.0 From: david.abdurachmanov@gmail.com To: elfutils-devel@lists.fedorahosted.org Subject: [PATCH] elfcmp: fix self-comparison error with GCC 6 Date: Mon, 11 Apr 2016 15:50:06 +0200 Message-ID: <1460382606-12821-1-git-send-email-david.abdurachmanov@gmail.com> --===============2918217631570488410== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: David Abdurachmanov Noticed with Fedora 24 Alpha, gcc (GCC) 6.0.0 20160406 (Red Hat 6.0.0-0.20). elfcmp.c: In function =E2=80=98main=E2=80=99: elfcmp.c:364:199: error: self-comparison always evaluates to false [-Werror=3Dtautological-compare] if (unlikely (name1 =3D=3D NULL || name2 =3D=3D NULL Signed-off-by: David Abdurachmanov --- src/ChangeLog | 4 ++++ src/elfcmp.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index f74b5dc..bdc9d13 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2016-04-11 David Abdurachmanov + + * elfcmp.c (main): Fix self-comparison error with GCC 6. + 2016-03-21 Mark Wielaard = * nm.c (show_symbols): Check for malloc size argument overflow. diff --git a/src/elfcmp.c b/src/elfcmp.c index 852b92f..7b5d39c 100644 --- a/src/elfcmp.c +++ b/src/elfcmp.c @@ -368,7 +368,7 @@ main (int argc, char *argv[]) && sym1->st_shndx !=3D SHN_UNDEF) || sym1->st_info !=3D sym2->st_info || sym1->st_other !=3D sym2->st_other - || sym1->st_shndx !=3D sym1->st_shndx)) + || sym1->st_shndx !=3D sym2->st_shndx)) { // XXX Do we want to allow reordered symbol tables? symtab_mismatch: -- = 2.7.3 --===============2918217631570488410==--