[Top][All Lists]

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

Re: [Qemu-ppc] [PATCH 7/9] openpic: avoid a warning from clang analyzer

From: Paolo Bonzini
Subject: Re: [Qemu-ppc] [PATCH 7/9] openpic: avoid a warning from clang analyzer
Date: Mon, 05 Sep 2011 08:48:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

On 09/04/2011 05:52 PM, Blue Swirl wrote:
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<address@hidden>
  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;
+    default:
      case IRQ_IDE:
          retval = opp->src[n_IRQ].ide;

Looks wrong, perhaps it should return 0?


reply via email to

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