[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 26/42] i386/hvf: Fixes some compilation warnings
From: |
Paolo Bonzini |
Subject: |
[PULL 26/42] i386/hvf: Fixes some compilation warnings |
Date: |
Sat, 8 Jun 2024 10:33:59 +0200 |
From: Phil Dennis-Jordan <phil@philjordan.eu>
A bunch of function definitions used empty parentheses instead of (void)
syntax, yielding the following warning when building with clang on macOS:
warning: a function declaration without a prototype is deprecated in all
versions 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 <phil@philjordan.eu>
Reviewed-by: Roman Bolshakov <roman@roolebo.dev>
Tested-by: Roman Bolshakov <roman@roolebo.dev>
Message-ID: <20240605112556.43193-3-phil@philjordan.eu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
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 0fffcfa46ce..3954ef883df 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 cr0,
uint64_t efer)
efer |= MSR_EFER_LMA;
wvmcs(vcpu, VMCS_GUEST_IA32_EFER, efer);
entry_ctls = 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);
uint64_t guest_tr_ar = 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 3728d7705e2..a4a28f113fd 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;
}
-void init_decoder()
+void init_decoder(void)
{
int i;
diff --git a/target/i386/hvf/x86_emu.c b/target/i386/hvf/x86_emu.c
index 3a3f0a50d0b..38c782b8e3b 100644
--- a/target/i386/hvf/x86_emu.c
+++ b/target/i386/hvf/x86_emu.c
@@ -1409,7 +1409,7 @@ static struct cmd_handler {
static struct cmd_handler _cmd_handler[X86_DECODE_CMD_LAST];
-static void init_cmd_handler()
+static void init_cmd_handler(void)
{
int i;
for (i = 0; i < ARRAY_SIZE(handlers); i++) {
@@ -1481,7 +1481,7 @@ bool exec_instruction(CPUX86State *env, struct x86_decode
*ins)
return true;
}
-void init_emu()
+void init_emu(void)
{
init_cmd_handler();
}
--
2.45.1
- [PULL 17/42] meson: Don't even detect posix_madvise() on Darwin, (continued)
- [PULL 17/42] meson: Don't even detect posix_madvise() on Darwin, Paolo Bonzini, 2024/06/08
- [PULL 18/42] osdep: Make qemu_madvise() to set errno in all cases, Paolo Bonzini, 2024/06/08
- [PULL 20/42] backends/hostmem: Report error when memory size is unaligned, Paolo Bonzini, 2024/06/08
- [PULL 21/42] machine, hostmem: improve error messages for unsupported features, Paolo Bonzini, 2024/06/08
- [PULL 22/42] hostmem: simplify the code for merge and dump properties, Paolo Bonzini, 2024/06/08
- [PULL 19/42] osdep: Make qemu_madvise() return ENOSYS on unsupported OSes, Paolo Bonzini, 2024/06/08
- [PULL 23/42] scsi-disk: Don't silently truncate serial number, Paolo Bonzini, 2024/06/08
- [PULL 24/42] stubs/meson: Fix qemuutil build when --disable-system, Paolo Bonzini, 2024/06/08
- [PULL 25/42] i386/hvf: Adds support for INVTSC cpuid bit, Paolo Bonzini, 2024/06/08
- [PULL 27/42] hvf: Consistent types for vCPU handles, Paolo Bonzini, 2024/06/08
- [PULL 26/42] i386/hvf: Fixes some compilation warnings,
Paolo Bonzini <=
- [PULL 28/42] i386/hvf: Fixes dirty memory tracking by page granularity RX->RWX change, Paolo Bonzini, 2024/06/08
- [PULL 29/42] i386/hvf: In kick_vcpu use hv_vcpu_interrupt to force exit, Paolo Bonzini, 2024/06/08
- [PULL 31/42] hvf: Makes assert_hvf_ok report failed expression, Paolo Bonzini, 2024/06/08
- [PULL 30/42] i386/hvf: Updates API usage to use modern vCPU run function, Paolo Bonzini, 2024/06/08
- [PULL 33/42] target/i386: mark CR4.FRED not reserved, Paolo Bonzini, 2024/06/08
- [PULL 32/42] target/i386: add support for FRED in CPUID enumeration, Paolo Bonzini, 2024/06/08
- [PULL 34/42] vmxcap: add support for VMX FRED controls, Paolo Bonzini, 2024/06/08
- [PULL 35/42] target/i386: enumerate VMX nested-exception support, Paolo Bonzini, 2024/06/08
- [PULL 36/42] target/i386: Add get/set/migrate support for FRED MSRs, Paolo Bonzini, 2024/06/08
- [PULL 37/42] docs: i386: pc: Avoid mentioning limit of maximum vCPUs, Paolo Bonzini, 2024/06/08