From: Andrew Cooper Date: Thu, 25 Sep 2014 10:00:07 +0000 (+0200) Subject: misc/coverity: Model __builtin_unreachable() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4331 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5a88f6fede9af886bc4a32cf1b3cf7c36ef7baad;p=xen.git misc/coverity: Model __builtin_unreachable() This resolves 23 issues Coverity had identified by following the false path of an ASSERT(). Signed-off-by: Andrew Cooper --- diff --git a/misc/coverity/model.c b/misc/coverity/model.c index fac2ecb794..bd62566a0d 100644 --- a/misc/coverity/model.c +++ b/misc/coverity/model.c @@ -120,6 +120,16 @@ void libxl__ctx_unlock(libxl_ctx *ctx) __coverity_recursive_lock_release__(&ctx->lock); } +/* + * 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