[PATCH] kvm tool: Remove unused variables from the QCOW code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Newer versions of GCC notice the following unused variables:

 qcow.c: In function âqcow_read_l1_tableâ:
 qcow.c:56:7: error: variable âpage_offsetâ set but not used [-Werror=unused-but-set-variable]
 qcow.c:54:6: error: variable âmap_offsetâ set but not used [-Werror=unused-but-set-variable]
 cc1: all warnings being treated as errors
 make: *** [qcow.o] Error 1

Remove them.

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
diff --git a/tools/kvm/qcow.c b/tools/kvm/qcow.c
index 1764975..a3e0537 100644
--- a/tools/kvm/qcow.c
+++ b/tools/kvm/qcow.c
@@ -51,9 +51,6 @@ int qcow_read_l1_table(struct qcow *q)
 	struct qcow1_header *h = q->header;
 	struct qcow_table *table;
 	u64 table_offset;
-	u64 map_offset;
-	const long page_size = sysconf(_SC_PAGESIZE);
-	long page_offset;
 	u32 l1_i;
 
 	q->table = table = calloc(1, sizeof(struct qcow_table));
@@ -63,9 +60,6 @@ int qcow_read_l1_table(struct qcow *q)
 	table->table_size   = qcow1_get_table_size(q);
 	table_offset        = h->l1_table_offset;
 
-	map_offset  = table_offset & page_size;
-	page_offset = table_offset & (~page_size);
-
 	table->l1_table = calloc(table->table_size, sizeof(u64));
 	if (!table->l1_table)
 		goto error;
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux