qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qcow2: Silence false warning
@ 2012-06-15 11:43 Kevin Wolf
  2012-06-15 11:54 ` malc
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Wolf @ 2012-06-15 11:43 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

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 <av1474@comtv.ru>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 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 b663b9f..d7e0e19 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.6.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] qcow2: Silence false warning
  2012-06-15 11:43 [Qemu-devel] [PATCH] qcow2: Silence false warning Kevin Wolf
@ 2012-06-15 11:54 ` malc
  0 siblings, 0 replies; 2+ messages in thread
From: malc @ 2012-06-15 11:54 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: qemu-devel

On Fri, 15 Jun 2012, Kevin Wolf wrote:

> 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.
> 

Applied, thanks.

-- 
mailto:av1474@comtv.ru

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-15 11:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-15 11:43 [Qemu-devel] [PATCH] qcow2: Silence false warning Kevin Wolf
2012-06-15 11:54 ` malc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).