From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id D03721F626 for ; Fri, 24 Feb 2023 06:38:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229716AbjBXGir (ORCPT ); Fri, 24 Feb 2023 01:38:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229720AbjBXGip (ORCPT ); Fri, 24 Feb 2023 01:38:45 -0500 Received: from cloud.peff.net (cloud.peff.net [104.130.231.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A889752DF8 for ; Thu, 23 Feb 2023 22:38:44 -0800 (PST) Received: (qmail 3672 invoked by uid 109); 24 Feb 2023 06:38:44 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Fri, 24 Feb 2023 06:38:44 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 31098 invoked by uid 111); 24 Feb 2023 06:38: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, 24 Feb 2023 01:38:43 -0500 Authentication-Results: peff.net; auth=none Date: Fri, 24 Feb 2023 01:38:43 -0500 From: Jeff King To: git@vger.kernel.org Subject: [PATCH 07/21] http-backend: mark unused parameters in virtual functions 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 The http-backend dispatches requests via a table of virtual functions. Some of the functions ignore their "arg" parameter, because it's implicit in the function (e.g., get_info_refs knows that it is dispatched only for a request to "/info/refs"). Mark these unused parameters to silence -Wunused-parameter. Signed-off-by: Jeff King --- http-backend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/http-backend.c b/http-backend.c index fc3ab97c0f..db963e64d7 100644 --- a/http-backend.c +++ b/http-backend.c @@ -524,7 +524,7 @@ static int show_text_ref(const char *name, const struct object_id *oid, return 0; } -static void get_info_refs(struct strbuf *hdr, char *arg) +static void get_info_refs(struct strbuf *hdr, char *arg UNUSED) { const char *service_name = get_parameter("service"); struct strbuf buf = STRBUF_INIT; @@ -578,7 +578,7 @@ static int show_head_ref(const char *refname, const struct object_id *oid, return 0; } -static void get_head(struct strbuf *hdr, char *arg) +static void get_head(struct strbuf *hdr, char *arg UNUSED) { struct strbuf buf = STRBUF_INIT; @@ -588,7 +588,7 @@ static void get_head(struct strbuf *hdr, char *arg) strbuf_release(&buf); } -static void get_info_packs(struct strbuf *hdr, char *arg) +static void get_info_packs(struct strbuf *hdr, char *arg UNUSED) { size_t objdirlen = strlen(get_object_directory()); struct strbuf buf = STRBUF_INIT; -- 2.39.2.981.g6157336f25