From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 1/2] target-arm: Fix unreachable code in gicv3_class_name()
Date: Tue, 19 Jul 2016 18:03:34 +0100 [thread overview]
Message-ID: <1468947815-9900-2-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1468947815-9900-1-git-send-email-peter.maydell@linaro.org>
Coverity complains that the exit() in gicv3_class_name()
can be unreachable, because if TARGET_AARCH64 is defined
then all code paths return before reaching it. Move the
exit() up to the error_report() that it belongs with.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Message-id: 1468260552-8400-1-git-send-email-peter.maydell@linaro.org
---
target-arm/machine.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/target-arm/machine.c b/target-arm/machine.c
index 2dbeb82..7a6ca31 100644
--- a/target-arm/machine.c
+++ b/target-arm/machine.c
@@ -340,10 +340,9 @@ const char *gicv3_class_name(void)
#else
error_report("KVM GICv3 acceleration is not supported on this "
"platform");
+ exit(1);
#endif
} else {
return "arm-gicv3";
}
-
- exit(1);
}
--
1.9.1
next prev parent reply other threads:[~2016-07-19 17:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 17:03 [Qemu-devel] [PULL 0/2] target-arm queue Peter Maydell
2016-07-19 17:03 ` Peter Maydell [this message]
2016-07-19 17:03 ` [Qemu-devel] [PULL 2/2] arm_gicv3: Add assert()s to tell Coverity that offsets are aligned Peter Maydell
2016-07-20 12:51 ` [Qemu-devel] [PULL 0/2] target-arm queue Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1468947815-9900-2-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).