From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH] misc/coverity: Model __builtin_unreachable() Date: Wed, 24 Sep 2014 14:53:14 +0100 Message-ID: <1411566794-11652-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Keir Fraser , Ian Campbell , Andrew Cooper , Tim Deegan , coverity@xenproject.org, Jan Beulich , Ian Jackson List-Id: xen-devel@lists.xenproject.org This resolves 23 issues Coverity had identified by following the false path of an ASSERT(). Signed-off-by: Andrew Cooper CC: coverity@xenproject.org CC: Keir Fraser CC: Jan Beulich CC: Tim Deegan CC: Ian Campbell CC: Ian Jackson --- misc/coverity/model.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/misc/coverity/model.c b/misc/coverity/model.c index fac2ecb..bd62566 100644 --- a/misc/coverity/model.c +++ b/misc/coverity/model.c @@ -121,6 +121,16 @@ void libxl__ctx_unlock(libxl_ctx *ctx) } /* + * Coverity doesn't understand __builtin_unreachable(), which causes it to + * incorrectly find issues based on continuing execution along the false + * branch of an ASSERT(). + */ +void __builtin_unreachable(void) +{ + __coverity_panic__(); +} + +/* * Local variables: * mode: C * c-file-style: "BSD" -- 1.7.10.4