From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [PATCH] userspace: Remove some unused variables Date: Mon, 18 Aug 2008 13:24:04 +0200 Message-ID: <48A95BD4.8050504@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit To: kvm-devel Return-path: Received: from lizzard.sbs.de ([194.138.37.39]:22291 "EHLO lizzard.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751484AbYHRLYH (ORCPT ); Mon, 18 Aug 2008 07:24:07 -0400 Received: from mail1.sbs.de (localhost [127.0.0.1]) by lizzard.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id m7IBO48c032729 for ; Mon, 18 Aug 2008 13:24:05 +0200 Received: from [139.25.109.167] (mchn012c.mchp.siemens.de [139.25.109.167] (may be forged)) by mail1.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id m7IBO4Wc005074 for ; Mon, 18 Aug 2008 13:24:04 +0200 Sender: kvm-owner@vger.kernel.org List-ID: There are more warnings, but one after the other. This patch addresses all current warnings regarding unused variables in KVM userspace. Signed-off-by: Jan Kiszka --- diff --git a/qemu/exec.c b/qemu/exec.c index 7a37dfd..37c8392 100644 --- a/qemu/exec.c +++ b/qemu/exec.c @@ -182,7 +182,6 @@ static void io_mem_init(void); CPUWriteMemoryFunc *io_mem_write[IO_MEM_NB_ENTRIES][4]; CPUReadMemoryFunc *io_mem_read[IO_MEM_NB_ENTRIES][4]; void *io_mem_opaque[IO_MEM_NB_ENTRIES]; -static int io_mem_nb; char io_mem_used[IO_MEM_NB_ENTRIES]; static int io_mem_watch; #endif diff --git a/qemu/hw/device-hotplug.c b/qemu/hw/device-hotplug.c index 3d170c5..8e2bc35 100644 --- a/qemu/hw/device-hotplug.c +++ b/qemu/hw/device-hotplug.c @@ -13,7 +13,6 @@ static PCIDevice *qemu_system_hot_add_nic(const char *opts, int bus_nr) { int ret; - char buf[4096]; PCIBus *pci_bus; pci_bus = pci_find_bus (bus_nr); diff --git a/qemu/kvm-tpr-opt.c b/qemu/kvm-tpr-opt.c index ab33ea0..d1557be 100644 --- a/qemu/kvm-tpr-opt.c +++ b/qemu/kvm-tpr-opt.c @@ -352,7 +352,7 @@ static void vtpr_ioport_write(void *opaque, uint32_t addr, uint32_t val) CPUState *env = cpu_single_env; struct kvm_regs regs; struct kvm_sregs sregs; - uint32_t rip, apic; + uint32_t rip; kvm_get_regs(kvm_context, env->cpu_index, ®s); rip = regs.rip - 2; diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index 1d07650..3466015 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -605,8 +605,6 @@ int kvm_main_loop(void) static int kvm_debug(void *opaque, int vcpu) { - CPUState *env = cpu_single_env; - kvm_debug_stop_requested = 1; vcpu_info[vcpu].stopped = 1; return 1;