mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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:
1 parent
0b964c0c7e
commit
5a88f6fede
1 file changed
+10
@@ -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
|
||||||
|
|||||||