Avoid this warning by clang analyzer by defining a default case:
/src/qemu/hw/openpic.c:477:5: warning: Undefined or garbage value
returned to caller
    return retval;

Signed-off-by: Blue Swirl <blauwir...@gmail.com>
---
 hw/openpic.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hw/openpic.c b/hw/openpic.c
index 26c96e2..4b883ac 100644
--- a/hw/openpic.c
+++ b/hw/openpic.c
@@ -469,6 +469,7 @@ static inline uint32_t read_IRQreg (openpic_t
*opp, int n_IRQ, uint32_t reg)
     case IRQ_IPVP:
         retval = opp->src[n_IRQ].ipvp;
         break;
+    default:
     case IRQ_IDE:
         retval = opp->src[n_IRQ].ide;
         break;
-- 
1.6.2.4
From 3c4f48ac6edafd3fae07d081e66b40e8144b1818 Mon Sep 17 00:00:00 2001
Message-Id: <3c4f48ac6edafd3fae07d081e66b40e8144b1818.1315150286.git.blauwir...@gmail.com>
In-Reply-To: <70f99a25b7732d4c9ea54f74c089ccb9bb323ea6.1315150286.git.blauwir...@gmail.com>
References: <70f99a25b7732d4c9ea54f74c089ccb9bb323ea6.1315150286.git.blauwir...@gmail.com>
From: Blue Swirl <blauwir...@gmail.com>
Date: Sun, 4 Sep 2011 11:19:33 +0000
Subject: [PATCH 7/9] openpic: avoid a warning from clang analyzer

Avoid this warning by clang analyzer by defining a default case:
/src/qemu/hw/openpic.c:477:5: warning: Undefined or garbage value returned to caller
    return retval;

Signed-off-by: Blue Swirl <blauwir...@gmail.com>
---
 hw/openpic.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hw/openpic.c b/hw/openpic.c
index 26c96e2..4b883ac 100644
--- a/hw/openpic.c
+++ b/hw/openpic.c
@@ -469,6 +469,7 @@ static inline uint32_t read_IRQreg (openpic_t *opp, int n_IRQ, uint32_t reg)
     case IRQ_IPVP:
         retval = opp->src[n_IRQ].ipvp;
         break;
+    default:
     case IRQ_IDE:
         retval = opp->src[n_IRQ].ide;
         break;
-- 
1.7.2.5

Reply via email to