@@ -527,7 +527,6 @@ static int posix_aio_init(void)
{
sigset_t mask;
PosixAioState *s;
- int fds[2];
struct qemu_paioinit ai;
if (posix_aio_state)
@@ -1005,16 +1005,6 @@ void bdrv_flush(BlockDriverState *bs)
bdrv_flush(bs->backing_hd);
}
-void bdrv_iterate_writeable(void (*it)(BlockDriverState *bs))
-{
- BlockDriverState *bs;
-
- for (bs = bdrv_first; bs != NULL; bs = bs->next)
- if (bs->drv && !bdrv_is_read_only(bs) &&
- (!bdrv_is_removable(bs) || bdrv_is_inserted(bs)))
- it(bs);
-}
-
void bdrv_flush_all(void)
{
BlockDriverState *bs;
@@ -76,7 +76,7 @@ static void extboot_write_cmd(void *opaque, uint32_t addr, uint32_t value)
union extboot_cmd *cmd = (void *)(phys_ram_base + ((value & 0xFFFF) << 4));
BlockDriverState *bs = opaque;
int cylinders, heads, sectors, err;
- int64_t nb_sectors;
+ uint64_t nb_sectors;
get_translated_chs(bs, &cylinders, &heads, §ors);
@@ -112,7 +112,7 @@ static struct vapic_bios vapic_bios;
static uint32_t real_tpr;
static uint32_t bios_addr;
static uint32_t vapic_phys;
-static int bios_enabled;
+static uint32_t bios_enabled;
static uint32_t vbios_desc_phys;
static void update_vbios_real_tpr(void)
@@ -752,7 +752,7 @@ static int tap_can_send(void *opaque)
static int tap_send_packet(TAPState *s)
{
- uint8_t *buf = s->buf;
+ uint8_t *buf = (uint8_t *)s->buf;
int size = s->size;
#ifdef IFF_VNET_HDR
@@ -102,12 +102,12 @@ static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
static void inject_interrupt(void *data)
{
- cpu_interrupt(current_env, (int)data);
+ cpu_interrupt(current_env, (long)data);
}
void kvm_inject_interrupt(CPUState *env, int mask)
{
- on_vcpu(env, inject_interrupt, (void *)mask);
+ on_vcpu(env, inject_interrupt, (void *)(long)mask);
}
void kvm_update_interrupt_request(CPUState *env)
@@ -612,7 +612,8 @@ int kvm_main_loop(void)
}
#ifdef KVM_CAP_SET_GUEST_DEBUG
-int kvm_debug(void *opaque, void *data, struct kvm_debug_exit_arch *arch_info)
+static int kvm_debug(void *opaque, void *data,
+ struct kvm_debug_exit_arch *arch_info)
{
int handle = kvm_arch_debug(arch_info);
struct CPUState *env = data;
@@ -1002,7 +1003,7 @@ struct kvm_set_guest_debug_data {
int err;
};
-void kvm_invoke_set_guest_debug(void *data)
+static void kvm_invoke_set_guest_debug(void *data)
{
struct kvm_set_guest_debug_data *dbg_data = data;
@@ -640,7 +640,7 @@ typedef struct CPUX86State {
/* in order to simplify APIC support, we leave this pointer to the
user */
struct APICState *apic_state;
- int mp_state;
+ uint32_t mp_state;
} CPUX86State;
CPUX86State *cpu_x86_init(const char *cpu_model);
@@ -4703,7 +4703,7 @@ void qemu_get_launch_info(int *argc, char ***argv, int *opt_daemonize, const cha
*opt_incoming = incoming;
}
-
+#ifdef USE_KVM
static int gethugepagesize(void)
{
int ret, fd;
@@ -4779,13 +4779,14 @@ static void *alloc_mem_area(size_t memory, unsigned long *len, const char *path)
*len = memory;
return area;
}
+#endif
static void *qemu_alloc_physram(unsigned long memory)
{
void *area = NULL;
+#ifdef USE_KVM
unsigned long map_len = memory;
-#ifdef USE_KVM
if (mem_path)
area = alloc_mem_area(memory, &map_len, mem_path);
#endif
@@ -5632,7 +5633,7 @@ int main(int argc, char **argv, char **envp)
}
#endif
-#if USE_KVM
+#ifdef USE_KVM
if (kvm_enabled()) {
if (kvm_qemu_init() < 0) {
fprintf(stderr, "Could not initialize KVM, will disable KVM support\n");
@@ -551,7 +551,7 @@ int ac_test_exec(ac_test_t *at)
return r;
}
-int ac_test_run()
+int ac_test_run(void)
{
static ac_test_t at;
int tests, successes;
@@ -574,7 +574,7 @@ int main()
int r;
printf("starting test\n\n");
- smp_init(ac_test_run);
+ smp_init((void(*)(void))ac_test_run);
r = ac_test_run();
return r ? 0 : 1;
}
@@ -134,7 +134,6 @@ void test_pop(void *mem)
{
unsigned long tmp;
unsigned long *stack_top = mem + 4096;
- unsigned long *new_stack_top;
unsigned long memw = 0x123456789abcdeful;
static unsigned long tmp2;
@@ -1,5 +1,5 @@
-#include "printf.h"
+#include "libcflat.h"
static inline unsigned long long rdtsc()
{
This patch kills the last warnings I see on a x86-64 host when building x86_64-softmmu and also i386-softmmu without kvm. [ If something should be split out into a separate patch, just let me know. ] Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> --- qemu/block-raw-posix.c | 1 - qemu/block.c | 10 ---------- qemu/hw/extboot.c | 2 +- qemu/kvm-tpr-opt.c | 2 +- qemu/net.c | 2 +- qemu/qemu-kvm.c | 9 +++++---- qemu/target-i386/cpu.h | 2 +- qemu/vl.c | 7 ++++--- user/test/x86/access.c | 4 ++-- user/test/x86/emulator.c | 1 - user/test/x86/vmexit.c | 2 +- 11 files changed, 16 insertions(+), 26 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html