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 <andrew.cooper3@citrix.com>
This commit is contained in:
Andrew Cooper authored and Jan Beulich committed 2014-09-25 12:00:07 +02:00
1 parent 0b964c0c7e
commit 5a88f6fede
1 file changed
+10
+10
View File
@@ -120,6 +120,16 @@ void libxl__ctx_unlock(libxl_ctx *ctx)
__coverity_recursive_lock_release__(&ctx->lock); __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: * Local variables:
* mode: C * mode: C
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.