]> xenbits.xensource.com Git - xen.git/commitdiff
misc/coverity: Model __builtin_unreachable()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 25 Sep 2014 10:00:07 +0000 (12:00 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 25 Sep 2014 10:00:07 +0000 (12:00 +0200)
This resolves 23 issues Coverity had identified by following the false path of
an ASSERT().

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
misc/coverity/model.c

index fac2ecb7945d662aa3edd82dabf510fd33c8b60f..bd62566a0deb12251db8a198942350c6ad766b17 100644 (file)
@@ -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