From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id B01AE1F953 for ; Fri, 3 Dec 2021 05:11:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229526AbhLCFPL (ORCPT ); Fri, 3 Dec 2021 00:15:11 -0500 Received: from cloud.peff.net ([104.130.231.41]:42696 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230000AbhLCFPG (ORCPT ); Fri, 3 Dec 2021 00:15:06 -0500 Received: (qmail 21990 invoked by uid 109); 3 Dec 2021 05:11:42 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Fri, 03 Dec 2021 05:11:42 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 28792 invoked by uid 111); 3 Dec 2021 05:11:43 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Fri, 03 Dec 2021 00:11:43 -0500 Authentication-Results: peff.net; auth=none Date: Fri, 3 Dec 2021 00:11:40 -0500 From: Jeff King To: Junio C Hamano Cc: Phillip Wood , git@vger.kernel.org Subject: [PATCH 2/3] xdiff: drop xpparam_t parameter from histogram cmp_recs() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Since 663c5ad035 (diff histogram: intern strings, 2021-11-17), our cmp_recs() does not call xdl_recmatch(), and thus no longer needs an xpparam_t struct from which to get the flags. We can drop the unused parameter from the function, as well as the macro which wraps it. There's no functional change here; it's just simplifying things (and making -Wunused-parameter happier). Signed-off-by: Jeff King --- xdiff/xhistogram.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xdiff/xhistogram.c b/xdiff/xhistogram.c index 399cc236d7..80794748b0 100644 --- a/xdiff/xhistogram.c +++ b/xdiff/xhistogram.c @@ -88,15 +88,14 @@ struct region { #define REC(env, s, l) \ (env->xdf##s.recs[l - 1]) -static int cmp_recs(xpparam_t const *xpp, - xrecord_t *r1, xrecord_t *r2) +static int cmp_recs(xrecord_t *r1, xrecord_t *r2) { return r1->ha == r2->ha; } #define CMP(i, s1, l1, s2, l2) \ - (cmp_recs(i->xpp, REC(i->env, s1, l1), REC(i->env, s2, l2))) + (cmp_recs(REC(i->env, s1, l1), REC(i->env, s2, l2))) #define TABLE_HASH(index, side, line) \ XDL_HASHLONG((REC(index->env, side, line))->ha, index->table_bits) -- 2.34.1.436.g8c445b282e