From nobody Fri Mar 29 05:06:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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 170.10.129.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=1668000306; cv=none; d=zohomail.com; s=zohoarc; b=hRgjdRI8XXM24gcbOmbiHITrLksf5MicXn70pbZyNstqURVjgPIPcUe3ETfYzFV3K/pWh3WClLRcYv9x426h6iDApyHVi/XQHKAtVFtjSobiqNFX82Q87i6KxZNpyksD9nCOJc1bA1wt97waldpZcZvylYOp/kWbbMflN4Nxk48= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1668000306; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=gvbYkORYh9NYWWGEZSc2ja/iRmP3C/jk+q0sp1Lb6zY=; b=CMTxTbl3+ajPY6NgsHMEXGShvTAPRpWqJ/KP/vPcK9/oMlnzWLmxBFpw229/55C3cK2pXHkqU/GtGKEFKIx/xZFRFyPDuKNcVeXyGMDAGSogFhwaZWgTVBomq8FoazITKzNA8ExlImF+rMuoOOyZk42fo4Nc7m/BtP/6p91ZIBI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1668000306431625.6387256074822; Wed, 9 Nov 2022 05:25:06 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-597-p5wUOT88Ob2ury03kI8u3g-1; Wed, 09 Nov 2022 08:24:09 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 028B887B2A9; Wed, 9 Nov 2022 13:24:06 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 91FA11415119; Wed, 9 Nov 2022 13:24:05 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 634271946594; Wed, 9 Nov 2022 13:24:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CBF561946588 for ; Wed, 9 Nov 2022 13:00:31 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B91DF492B1A; Wed, 9 Nov 2022 13:00:31 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5DBF5492B17 for ; Wed, 9 Nov 2022 13:00:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668000304; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=gvbYkORYh9NYWWGEZSc2ja/iRmP3C/jk+q0sp1Lb6zY=; b=cQJ+lk35H/a8eEZE+pceYGw54a0IT3RGKT0l9+ahR/QfNxnf32fCAMNsEG8zNgM2q9D9kk Wd+XeOqVMDLBPIBZq8UKhaC5BLTQI7W8bEJ16Zsz3khlSDZV7Fmuxn2714bbRkR7sYrQly BDTOteUiy7JUOIZmPGj8mZcB2LVEJ80= X-MC-Unique: p5wUOT88Ob2ury03kI8u3g-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH] qemu: Add missing 'break' statement in couple of switch()-es Date: Wed, 9 Nov 2022 14:00:30 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1668000307064100001 Content-Type: text/plain; charset="utf-8"; x-default="true" In recent commits migration of TPM on shared storage was introduced. However, I've only complied it with gcc and thus did not notice that clang build fails due to missing break; at the end of some (empty) cases in switch() statements. Signed-off-by: Michal Privoznik --- Pushed under trivial and build breaker rules. src/qemu/qemu_domain.c | 1 + src/qemu/qemu_tpm.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 41e616ca48..3435da5bdc 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1202,6 +1202,7 @@ qemuDomainTPMPrivateFormat(const virDomainTPMDef *tpm, =20 case VIR_DOMAIN_TPM_TYPE_PASSTHROUGH: case VIR_DOMAIN_TPM_TYPE_LAST: + break; } =20 return 0; diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c index dc15514ca6..15ee7db757 100644 --- a/src/qemu/qemu_tpm.c +++ b/src/qemu/qemu_tpm.c @@ -1019,6 +1019,7 @@ qemuTPMHasSharedStorage(virDomainDef *def) return virFileIsSharedFS(tpm->data.emulator.storagepath) =3D= =3D 1; case VIR_DOMAIN_TPM_TYPE_PASSTHROUGH: case VIR_DOMAIN_TPM_TYPE_LAST: + break; } } =20 @@ -1038,6 +1039,7 @@ qemuTPMCanMigrateSharedStorage(virDomainDef *def) return QEMU_DOMAIN_TPM_PRIVATE(tpm)->swtpm.can_migrate_shared_= storage; case VIR_DOMAIN_TPM_TYPE_PASSTHROUGH: case VIR_DOMAIN_TPM_TYPE_LAST: + break; } } return true; --=20 2.37.4