qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH stable-1.1 14/26] qcow2: Silence false warning


From: Michael Roth
Subject: [Qemu-devel] [PATCH stable-1.1 14/26] qcow2: Silence false warning
Date: Fri, 22 Jun 2012 19:33:18 -0500

From: Kevin Wolf <address@hidden>

Some gcc versions seem not to be able to figure out that the switch
statement covers all possible values and that c is therefore always
initialised. Add a default branch for them.

Reported-by: malc <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
Signed-off-by: malc <address@hidden>
---
 block/qcow2-cluster.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index 4b3345b..c173fcd 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -471,6 +471,8 @@ int qcow2_get_cluster_offset(BlockDriverState *bs, uint64_t 
offset,
                 QCOW_OFLAG_COMPRESSED | QCOW_OFLAG_ZERO);
         *cluster_offset &= L2E_OFFSET_MASK;
         break;
+    default:
+        abort();
     }
 
     qcow2_cache_put(bs, s->l2_table_cache, (void**) &l2_table);
-- 
1.7.4.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]