From nobody Fri May 17 08:24:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1695398831; cv=none; d=zohomail.com; s=zohoarc; b=DlqUl44G3coGOTWtnkCkSKkUuKKuJUPr7e19vSjiUrz0yQvL1thZb2Ayl+L/5J5A6aG0BAnsMW1L0ynsXQxjuy+qDJhlf2im3tAo8GBws3MqwRiHU8J/uMid1hAOLhOYZnltcJ6/P2oYqPQeQjRv0hyZ50lbs9Cf7pN8LwoB54I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695398831; h=Content-Type:Content-Transfer-Encoding:Cc: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=24WuyQ1scz0PFBfqnH8zGPOT+2di+fXBWZSPsO4PP44=; b=DxUSXTWF74cKflEUr3oulrcZ+Xt0j7ktahFjJ30rRIi/vjrQCidE067FGKU5ZqADgKqFQQootJu3u/REMx9awKWeVhKGSDhnPP/1M/gB546eolM+eoHbh+J70iNXdYFTGSF6cxzE3rhUdD9L+HV+sl+xAEPkS8AzExBiX938p+A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1695398831291842.880105623693; Fri, 22 Sep 2023 09:07:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjigD-0001Ua-M9; Fri, 22 Sep 2023 12:06:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjig7-0001Ap-Hu for qemu-devel@nongnu.org; Fri, 22 Sep 2023 12:06:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjig5-00088f-UU for qemu-devel@nongnu.org; Fri, 22 Sep 2023 12:06:51 -0400 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-338-__O4IgC3NJKimjbOK9Qkuw-1; Fri, 22 Sep 2023 12:06:47 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AEF7E8030CB for ; Fri, 22 Sep 2023 16:06:46 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2E27C40C2064; Fri, 22 Sep 2023 16:06:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695398808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=24WuyQ1scz0PFBfqnH8zGPOT+2di+fXBWZSPsO4PP44=; b=XXcjSNGGPp0wXghuSCWjT/VMdxXaKZl3RLBmkIpoPtGUcyhl+JkHrNUD4kKl8XJumvKYc0 zlgLDfCc3566aov1IrfNHNJiCmh5LJFMLYa38XRBE6D1l/CV7Wb3lb1VyOLtTEMfildaJD p5tFhRoCkUIsc4HKYD2DmlraM7YVS7Y= X-MC-Unique: __O4IgC3NJKimjbOK9Qkuw-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Markus Armbruster Subject: [PATCH 1/2] crypto: remove shadowed 'ret' variable Date: Fri, 22 Sep 2023 17:06:43 +0100 Message-ID: <20230922160644.438631-2-berrange@redhat.com> In-Reply-To: <20230922160644.438631-1-berrange@redhat.com> References: <20230922160644.438631-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TVD_SUBJ_WIPE_DEBT=1.004 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695398832157100005 Both instances of 'ret' are used to store a gnutls API return code. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- crypto/tls-cipher-suites.c | 1 - 1 file changed, 1 deletion(-) diff --git a/crypto/tls-cipher-suites.c b/crypto/tls-cipher-suites.c index 5e4f597464..d0df4badc0 100644 --- a/crypto/tls-cipher-suites.c +++ b/crypto/tls-cipher-suites.c @@ -52,7 +52,6 @@ GByteArray *qcrypto_tls_cipher_suites_get_data(QCryptoTLS= CipherSuites *obj, byte_array =3D g_byte_array_new(); =20 for (i =3D 0;; i++) { - int ret; unsigned idx; const char *name; IANA_TLS_CIPHER cipher; --=20 2.41.0 From nobody Fri May 17 08:24:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1695398830; cv=none; d=zohomail.com; s=zohoarc; b=FKh50wLoNbjWrVkjjvC+9aFxrK6+w4VUrjCn82IiErKvnWZ7imEQ/aRLLMW76FTiaJlOyfWrydPj+l4DaaojE9K6TSDbCxS9wzgeO3VFhPGZO7oOcwBxkC9ZZoZFzVXLKLqP8ucJPs/0dvoV/GAj4a/NdWN/C8xqYjuFKjJ3qik= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695398830; h=Content-Type:Content-Transfer-Encoding:Cc: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=HvaN0nDMvAHNOVOyU7iVBv5Ha46YoKQ9tPYoZMx8uQk=; b=Eknes8rlGyfcNxoFI+IOoHBtUL2BraZOVLFj/ysWsMyU7f7rDkor/EQLEGQY7eKN2tI/b/nzY8NxEMLYKzx7gQak2RRSp9HxfiCud4NtnE4CzKgjPuBWmanVh1ary3SYza9Dd1iL97DTfcN085X/PhnOPKz9HnDZKgmPf1w0tQk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1695398830385810.421140132689; Fri, 22 Sep 2023 09:07:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjigG-0001lw-NT; Fri, 22 Sep 2023 12:07:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjig8-0001BX-RW for qemu-devel@nongnu.org; Fri, 22 Sep 2023 12:06:54 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjig6-00088r-6V for qemu-devel@nongnu.org; Fri, 22 Sep 2023 12:06:52 -0400 Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-641-EvHw838PNimBV7AgYcKPuw-1; Fri, 22 Sep 2023 12:06:47 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 81E173C108EF for ; Fri, 22 Sep 2023 16:06:47 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD4B240C2064; Fri, 22 Sep 2023 16:06:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695398809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HvaN0nDMvAHNOVOyU7iVBv5Ha46YoKQ9tPYoZMx8uQk=; b=UjerWt3OYuV9KFP4Ejr7IgD44faL/QUvTAkMvNwXRdG8aX/xwvgVSoY7jylouK2AiAk+9R sVaBFm069W3Og2/nWzaAOIHbNS5eFu5zzBjzJ5haEukbJLH7QvkMWKTZeoPc647rx2YetD t8DgNWAzNizuzRjLKlleeKFKMzDmPtI= X-MC-Unique: EvHw838PNimBV7AgYcKPuw-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Markus Armbruster Subject: [PATCH 2/2] seccomp: avoid shadowing of 'action' variable Date: Fri, 22 Sep 2023 17:06:44 +0100 Message-ID: <20230922160644.438631-3-berrange@redhat.com> In-Reply-To: <20230922160644.438631-1-berrange@redhat.com> References: <20230922160644.438631-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1695398831932100003 This is confusing as one 'action' variable is used for storing a SCMP_ enum value, while the other 'action' variable is used for storing a SECCOMP_ enum value. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Markus Armbruster --- softmmu/qemu-seccomp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/softmmu/qemu-seccomp.c b/softmmu/qemu-seccomp.c index d66a2a1226..4d7439e7f7 100644 --- a/softmmu/qemu-seccomp.c +++ b/softmmu/qemu-seccomp.c @@ -283,9 +283,9 @@ static uint32_t qemu_seccomp_update_action(uint32_t act= ion) if (action =3D=3D SCMP_ACT_TRAP) { static int kill_process =3D -1; if (kill_process =3D=3D -1) { - uint32_t action =3D SECCOMP_RET_KILL_PROCESS; + uint32_t testaction =3D SECCOMP_RET_KILL_PROCESS; =20 - if (qemu_seccomp(SECCOMP_GET_ACTION_AVAIL, 0, &action) =3D=3D = 0) { + if (qemu_seccomp(SECCOMP_GET_ACTION_AVAIL, 0, &testaction) =3D= =3D 0) { kill_process =3D 1; } else { kill_process =3D 0; --=20 2.41.0