aboutsummaryrefslogtreecommitdiff
path: root/src/coverity-model.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coverity-model.c')
-rw-r--r--src/coverity-model.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/coverity-model.c b/src/coverity-model.c
index 4338b75ea2..44953a3de4 100644
--- a/src/coverity-model.c
+++ b/src/coverity-model.c
@@ -111,3 +111,31 @@ void * xmemdup(const void *data, size_t len)
__coverity_writeall__(p);
return p;
}
+
+// Teach coverity that lua errors are noreturn
+
+typedef struct {} lua_State;
+
+int luaL_typerror(lua_State *L, int narg, const char *tname)
+{
+ __coverity_panic__();
+ return 0;
+}
+
+int luaL_error(lua_State *L, const char *fmt, ...)
+{
+ __coverity_panic__();
+ return 0;
+}
+
+int luaL_argerror(lua_State *L, int numarg, const char *extramsg)
+{
+ __coverity_panic__();
+ return 0;
+}
+
+void *luaL_checkudata(lua_State *L, int ud, const char *tname)
+{
+ return __coverity_alloc_nosize__()
+}
+