From nobody Wed Nov 6 15:24:59 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 ARC-Seal: i=1; a=rsa-sha256; t=1717586889; cv=none; d=zohomail.com; s=zohoarc; b=B35+jhiWxwfvXmzLI0Il7zmBf1MnDpXeVyfVQKqL8jiyk8TuY3n2hWCoP5GRzsTEQxbWu5OTepOyayaUn+LLDpauIgkv36D81MdAQRVKJSClVccG1PeCxFTACZdRAWU1q/pMZZXD/A4dm292LhoH9+cnVGLVnAw1clKp+6+LGsw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1717586889; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Jz+LXvXPAM70EjQQqCu1N8a5rP+u5jvbMbCKW1n/wvc=; b=KpZKTfvbdc3oCvbgG+hcbeByNY7Rws/AdHna2ssYiC69GAq9wTqLe8SNH3eABb8bjQ/r8HIsuiSJHNTlt9+OHVrFMJT4Jp4exQeA4FCHtAzDv6JqE/qBEZaucwFWYGn525xKo/BmlvrYaAu7udk19R91WKzg70A94YhrXGwLKOQ= 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1717586889232401.203716745003; Wed, 5 Jun 2024 04:28:09 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sEomv-0005TG-Lv; Wed, 05 Jun 2024 07:26:41 -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 1sEomt-0005QR-7d for qemu-devel@nongnu.org; Wed, 05 Jun 2024 07:26:39 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sEomq-0003K6-PN for qemu-devel@nongnu.org; Wed, 05 Jun 2024 07:26:38 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-57a68b0fbd0so3293188a12.1 for ; Wed, 05 Jun 2024 04:26:36 -0700 (PDT) Received: from localhost.localdomain (89-104-8-249.customer.bnet.at. [89.104.8.249]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57a51023af4sm7111335a12.29.2024.06.05.04.26.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 04:26:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philjordan-eu.20230601.gappssmtp.com; s=20230601; t=1717586795; x=1718191595; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Jz+LXvXPAM70EjQQqCu1N8a5rP+u5jvbMbCKW1n/wvc=; b=2WPP6TDEFBXAvd1MKJqxaEn7PSPvvFOgkqouNb8N4T9U2nufVK/cic2XaUVrouU48G I7QDPJiGwBe8ESS2l334gWBGNVgPD1p7QS0cw1B8o+Z/x5NXsKb9/a7Xvyya19y4bd/U u4/0OIbkz4MCV1HxHBoo0KVRpxxZ4RzYxekXS2LJ58vsYvp+5suSZ8EJKJEobieNXZaz CfDWeGeKgWn0CURoR/CMkUHFpIwzoGtRWdTX/0XpGJT40ynIL2HUN+mV1LBPhIKfLy/W +NiHRVgaIIUgPfjZgb6I6SMwJKzm2DO8LznK1Urfmnrw4BLBMtKK6phVYvvk719NmJXl vl5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717586795; x=1718191595; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Jz+LXvXPAM70EjQQqCu1N8a5rP+u5jvbMbCKW1n/wvc=; b=YvA7dzxntmzzawQvHK/28EafznFqOH+pnsrRhzPPnuWWDb2qLv1FNnmaPaHn9FZam/ ElkUVsdb7eo/0vj5SYZ+kUPZeHwYWsn+khbhQZ0EQDddhK1W2XH2cWRh7bE1Bpg2gbee ba3RCWKFpyq+WGhUwhPgNZBCPDD/FS+wS+1ugHJ4+zQtfHBq50TOxZ/g22OwEgXfA1wr uXgZFIrq7uWjorYodW5L8oMXo4EDNwXMhLimQftjQz5M3Q+tUBs+0Ni/pznMXdnLFsE/ 58eDMuyF2VdVabBB9weKY+S4o9RBTQxgLtj9ZvZcn4S2b286J/OFh/CWHvLLi1exS+be 5LDQ== X-Gm-Message-State: AOJu0Yw/Kq+qE3c93xhyfuvKYeOtTJlpC1mYEDa7cKKnCXluw0cXudhb yiUCXq+XMntT0NOaq1SA9v+Mfi/w5sbR3Dx53SU4CjVcjglseX744Y/nANcU+8uJtfvBBehbcg4 = X-Google-Smtp-Source: AGHT+IF7bSB3b1MIka1x5hxtiRau/mQrhq/7XtAxhAWO22OVw1H0TP7TkE4mOa5XT045eDqd2DfMuw== X-Received: by 2002:a50:bb44:0:b0:57a:24db:f389 with SMTP id 4fb4d7f45d1cf-57a8b6b664emr1536760a12.21.1717586795393; Wed, 05 Jun 2024 04:26:35 -0700 (PDT) From: Phil Dennis-Jordan To: qemu-devel@nongnu.org Cc: dirty@apple.com, rbolshakov@ddn.com, lists@philjordan.eu, Phil Dennis-Jordan , Roman Bolshakov Subject: [PATCH v3 2/7] i386/hvf: Fixes some compilation warnings Date: Wed, 5 Jun 2024 13:25:51 +0200 Message-Id: <20240605112556.43193-3-phil@philjordan.eu> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20240605112556.43193-1-phil@philjordan.eu> References: <20240605112556.43193-1-phil@philjordan.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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: neutral client-ip=2a00:1450:4864:20::52e; envelope-from=phil@philjordan.eu; helo=mail-ed1-x52e.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NEUTRAL=0.779, T_SCC_BODY_TEXT_LINE=-0.01 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 @philjordan-eu.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1717586890979100007 Content-Type: text/plain; charset="utf-8" A bunch of function definitions used empty parentheses instead of (void) sy= ntax, yielding the following warning when building with clang on macOS: warning: a function declaration without a prototype is deprecated in all ve= rsions of C [-Wstrict-prototypes] In addition to fixing these function headers, it also fixes what appears to= be a typo causing a variable to be unused after initialisation. warning: variable 'entry_ctls' set but not used [-Wunused-but-set-variable] Signed-off-by: Phil Dennis-Jordan Reviewed-by: Roman Bolshakov Tested-by: Roman Bolshakov --- target/i386/hvf/vmx.h | 3 +-- target/i386/hvf/x86_decode.c | 2 +- target/i386/hvf/x86_emu.c | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/target/i386/hvf/vmx.h b/target/i386/hvf/vmx.h index 0fffcfa46c..3954ef883d 100644 --- a/target/i386/hvf/vmx.h +++ b/target/i386/hvf/vmx.h @@ -95,8 +95,7 @@ static void enter_long_mode(hv_vcpuid_t vcpu, uint64_t cr= 0, uint64_t efer) efer |=3D MSR_EFER_LMA; wvmcs(vcpu, VMCS_GUEST_IA32_EFER, efer); entry_ctls =3D rvmcs(vcpu, VMCS_ENTRY_CTLS); - wvmcs(vcpu, VMCS_ENTRY_CTLS, rvmcs(vcpu, VMCS_ENTRY_CTLS) | - VM_ENTRY_GUEST_LMA); + wvmcs(vcpu, VMCS_ENTRY_CTLS, entry_ctls | VM_ENTRY_GUEST_LMA); =20 uint64_t guest_tr_ar =3D rvmcs(vcpu, VMCS_GUEST_TR_ACCESS_RIGHTS); if ((efer & MSR_EFER_LME) && diff --git a/target/i386/hvf/x86_decode.c b/target/i386/hvf/x86_decode.c index 3728d7705e..a4a28f113f 100644 --- a/target/i386/hvf/x86_decode.c +++ b/target/i386/hvf/x86_decode.c @@ -2111,7 +2111,7 @@ uint32_t decode_instruction(CPUX86State *env, struct = x86_decode *decode) return decode->len; } =20 -void init_decoder() +void init_decoder(void) { int i; =20 diff --git a/target/i386/hvf/x86_emu.c b/target/i386/hvf/x86_emu.c index 3a3f0a50d0..38c782b8e3 100644 --- a/target/i386/hvf/x86_emu.c +++ b/target/i386/hvf/x86_emu.c @@ -1409,7 +1409,7 @@ static struct cmd_handler { =20 static struct cmd_handler _cmd_handler[X86_DECODE_CMD_LAST]; =20 -static void init_cmd_handler() +static void init_cmd_handler(void) { int i; for (i =3D 0; i < ARRAY_SIZE(handlers); i++) { @@ -1481,7 +1481,7 @@ bool exec_instruction(CPUX86State *env, struct x86_de= code *ins) return true; } =20 -void init_emu() +void init_emu(void) { init_cmd_handler(); } --=20 2.36.1