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 <mi...@elte.hu>
---
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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to