Skip to contentSkip to conversation

userspace: Remove some unused variables

PATCH In review Jan Kiszka 2 participants 2 messages Aug 18, 2008 KVM

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 userspace: Remove some unused variables

There are more warnings, but one after the other. This patch addresses all current warnings regarding unused variables in KVM userspace.

---

qemu/exec.c +0 -1
index 7a37dfd..37c8392 100644
@@ -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
qemu/hw/device-hotplug.c +0 -1
index 3d170c5..8e2bc35 100644
@@ -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);
qemu/kvm-tpr-opt.c +1 -1
index ab33ea0..d1557be 100644
@@ -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, &regs);
     rip = regs.rip - 2;
qemu/qemu-kvm.c +0 -2
index 1d07650..3466015 100644
@@ -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;
#1 lore raw
Quoted 3 lines · Jan Kiszka

There are more warnings, but one after the other. This patch addresses all current warnings regarding unused variables in KVM userspace.

Applied (as well as the next patch), thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function