From nobody Mon Feb 9 01:16:57 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1589556507; cv=none; d=zohomail.com; s=zohoarc; b=N2y4l9G6bZ3j1XCnWgE1QTcn1QuJdaFtHMbvVvwiT4el77Lm/Of/ieEOolIw3l7pRy9jM4qlHpvzLh3aHVcszh6wARdr4WouxmaDHHsts/k8KAtjRzLH1vac0uLrREZBlltn0t5kO4g3l9s9GL6n0fkb09wtHvWP+VhBwmw2Sl0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589556507; 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=sQJuJn6FTWNzxL8rbmC2Y35RaIK4/KIVNkjF4IqZxpk=; b=eKkqDxkirbg5pASOAmc0GPFMuW8B7pwspDZ5w1zVKP8IyM+/BxgJQ+bEz3n0Oq2Zymp0cmsoxe7VCuakQeoHhryGsuEzJGT73nGEX68QMzKPhh4XVMCRX9RwQY/4KjSHgDEWIePh9MKY/5e+HUigHXvDBtArWWepTohNVZrdejM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1589556507430876.8542622711042; Fri, 15 May 2020 08:28:27 -0700 (PDT) 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-513-dJ46RKbLPBqveVLNzGbGbA-1; Fri, 15 May 2020 11:28:23 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E69911054F97; Fri, 15 May 2020 15:28:17 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C64EB5C241; Fri, 15 May 2020 15:28:17 +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 9791B1809561; Fri, 15 May 2020 15:28:17 +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 04FFSFRt011133 for ; Fri, 15 May 2020 11:28:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id C43A05D9C9; Fri, 15 May 2020 15:28:15 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.208.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 327545D9D7 for ; Fri, 15 May 2020 15:28:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589556505; 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=sQJuJn6FTWNzxL8rbmC2Y35RaIK4/KIVNkjF4IqZxpk=; b=LDKuaJGTheic9+smxA5E8yM0KFRRphNe08GQ2i3XibDTW4rd1Bcy93IPj5HgFvlBXLGjAT aHryMQzpRfQjJZJpKCjsZkUcLW8eg3KY/zQiXB7TshJbOyO4sR4E3Q3f+TKLfRpPLQlY4N wh9e/DtJK3/5TRYNR0av/lp/DYQWH2U= X-MC-Unique: dJ46RKbLPBqveVLNzGbGbA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 03/21] qemuBuildChannelsCommandLine: Use typecasted switch for channel type Date: Fri, 15 May 2020 17:27:49 +0200 Message-Id: <47045d540986bb7246ce917b877ec9f53adad5aa.1589556042.git.pkrempa@redhat.com> 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.16 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" Cover all cases of the enum. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- src/qemu/qemu_command.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index bfe70ed228..06568ae585 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -8523,7 +8523,7 @@ qemuBuildChannelsCommandLine(virLogManagerPtr logMana= ger, virDomainChrDefPtr channel =3D def->channels[i]; char *devstr; - switch (channel->targetType) { + switch ((virDomainChrChannelTargetType) channel->targetType) { case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_GUESTFWD: if (!(devstr =3D qemuBuildChrChardevStr(logManager, secManager, cmd, cfg, def, @@ -8555,6 +8555,11 @@ qemuBuildChannelsCommandLine(virLogManagerPtr logMan= ager, if (qemuBuildChrDeviceCommandLine(cmd, def, channel, qemuCaps)= < 0) return -1; break; + + case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_XEN: + case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_NONE: + case VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_LAST: + return -1; } } --=20 2.26.2