From nobody Mon Feb 9 03:14:06 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612448078; cv=none; d=zohomail.com; s=zohoarc; b=mU44NWNoiiszfuFj+Iw3dq2WXBqpXTjYRLYcWfqc7kYt76WREqpYU7La9oUMWZfFF833moHaIQr4k/4itS5zpTFbG01qkTiFm9duXpWp7/A3yzUkdxVeVF15wB+9DENeDfAdty9kN6yGoLEb+zmlieVhtR9PZWt7/gFKYPsuCdk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612448078; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3iUuAfBcQHxJijJ11fmvEg0aN6DBbUwmJFI1yXzlP34=; b=iyK/RA/MdJqxuQULzeduaGyCpHp3Hb24cwnjXlY2Pr0Ydj8Y2oN4ajmA/CeT5oUjooOEofVs+Er65iedXiIerSQSc6TNJLE8NLD26k/2BY8I9IxZvgC4SytApOVHAPoU0LfrvE6MV/d0NST7zYLRQR+O6LOwk9T0wWriUbwQX8I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1612448078383267.0973742654435; Thu, 4 Feb 2021 06:14:38 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-155-SMIyT2bdOaWP7JtMXMhUXQ-1; Thu, 04 Feb 2021 09:14:34 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6BEBE100C66F; Thu, 4 Feb 2021 14:14:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4AB0E722EE; Thu, 4 Feb 2021 14:14:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1899D5807D; Thu, 4 Feb 2021 14:14:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 114EE5VT031699 for ; Thu, 4 Feb 2021 09:14:05 -0500 Received: by smtp.corp.redhat.com (Postfix) id 852055DA2E; Thu, 4 Feb 2021 14:14:05 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.193.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id 059645D9F4 for ; Thu, 4 Feb 2021 14:13:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612448076; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=3iUuAfBcQHxJijJ11fmvEg0aN6DBbUwmJFI1yXzlP34=; b=GyYd5TjpfuWPYbUz39pabBelqN/HXBjDgxhCwZI9Q0KZcNa2weoHU+EL1NM4mLTIUMUlxO 7Pz5Dt9xTF8YRaOowUmQl+01Q86R+VGV5aoZAdxmT8kNmW/XUVebNwybbD4dckzbOVdn8J NQG0zaNV+4xDRjGtR5tBzdB9caHqqJw= X-MC-Unique: SMIyT2bdOaWP7JtMXMhUXQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 12/12] vsh: Drop unused @text arg from readline generators Date: Thu, 4 Feb 2021 15:13:37 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" After previous patches neither vshReadlineCommandGenerator() nor vshReadlineOptionsGenerator() use prefix that user wants to complete. The argument is marked as unused in both functions. Drop it then. Signed-off-by: Michal Privoznik --- tools/vsh.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/vsh.c b/tools/vsh.c index 3650b7130a..708e8b6f86 100644 --- a/tools/vsh.c +++ b/tools/vsh.c @@ -2557,14 +2557,13 @@ vshTreePrint(vshControl *ctl, vshTreeLookup lookup,= void *opaque, =20 /** * vshReadlineCommandGenerator: - * @text: optional command prefix * * Generator function for command completion. * * Returns a string list of all commands, or NULL on failure. */ static char ** -vshReadlineCommandGenerator(const char *text G_GNUC_UNUSED) +vshReadlineCommandGenerator(void) { size_t grp_list_index =3D 0; const vshCmdGrp *grp; @@ -2597,8 +2596,7 @@ vshReadlineCommandGenerator(const char *text G_GNUC_U= NUSED) } =20 static char ** -vshReadlineOptionsGenerator(const char *text G_GNUC_UNUSED, - const vshCmdDef *cmd, +vshReadlineOptionsGenerator(const vshCmdDef *cmd, vshCmd *last) { size_t list_index =3D 0; @@ -2742,9 +2740,9 @@ vshReadlineParse(const char *text, int state) opt =3D vshReadlineCommandFindOpt(partial); =20 if (!cmd) { - list =3D vshReadlineCommandGenerator(text); + list =3D vshReadlineCommandGenerator(); } else if (!opt || opt->type =3D=3D VSH_OT_BOOL) { - list =3D vshReadlineOptionsGenerator(text, cmd, partial); + list =3D vshReadlineOptionsGenerator(cmd, partial); } else if (opt && opt->completer) { list =3D opt->completer(autoCompleteOpaque, partial, --=20 2.26.2