This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
[PATCH] Don't use comparison_fn_t
- From: Ulf Hermann <ulf dot hermann at qt dot io>
- To: <elfutils-devel at sourceware dot org>
- Date: Thu, 20 Apr 2017 15:40:46 +0200
- Subject: [PATCH] Don't use comparison_fn_t
- Authentication-results: sourceware.org; auth=none
- Authentication-results: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=qt.io;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qtcompany.onmicrosoft.com; s=selector1-qt-io; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=22JDYsvwFB/HVGMbakIH2UHmKnAE51EHbOLNyJQUnxU=; b=iemayeTnjN9IfO85GG/pG+1VstHUfFBZMYu8B9B6f4ZCmDFXnosN5x+wBDwCIyDMoYSfNtOEbd3HEgdNRZqMkn3ye6F5U7bV/hFGV8q+I596jv1Inc7xKpxRQ966+95QARyrJsZdHOIJt/NdRpWf7VsenRjM4u1lK10q6cPauOU=
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Not all search.h declare it, and it is not very helpful anyway.
Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
---
libcpu/ChangeLog | 4 ++++
libcpu/i386_parse.y | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog
index 79110c2..ec22dd2 100644
--- a/libcpu/ChangeLog
+++ b/libcpu/ChangeLog
@@ -1,3 +1,7 @@
+2017-04-20 Ulf Hermann <ulf.hermann@qt.io>
+
+ * i386_parse.y: Eliminate comparison_fn_t.
+
2016-11-02 Mark Wielaard <mjw@redhat.com>
* i386_disasm.c (i386_disasm): Add fallthrough comment.
diff --git a/libcpu/i386_parse.y b/libcpu/i386_parse.y
index 15a72b1..5fc0682 100644
--- a/libcpu/i386_parse.y
+++ b/libcpu/i386_parse.y
@@ -309,10 +309,10 @@ instr: bytes ':' bitfieldopt kID bitfieldopt optargs
newp->mnemonic = $4;
if (newp->mnemonic != (void *) -1l
&& tfind ($4, &mnemonics,
- (comparison_fn_t) strcmp) == NULL)
+ (int (*)(const void *, const void *)) strcmp) == NULL)
{
if (tsearch ($4, &mnemonics,
- (comparison_fn_t) strcmp) == NULL)
+ (int (*)(const void *, const void *)) strcmp) == NULL)
error (EXIT_FAILURE, errno, "tsearch");
++nmnemonics;
}
--
2.1.4