]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib+daemon: annotated lua_error() for static checkers
authorMarek Vavruša <marek.vavrusa@nic.cz>
Sat, 28 Nov 2015 20:35:33 +0000 (21:35 +0100)
committerMarek Vavruša <marek.vavrusa@nic.cz>
Sat, 28 Nov 2015 20:35:33 +0000 (21:35 +0100)
daemon/bindings.c
daemon/engine.c
lib/defines.h

index 39469cb846d8a1f17a6eb85e694aa777faaf0fb2..9c751146a1ad73fb072828d746cf353363554cbb 100644 (file)
@@ -21,6 +21,9 @@
 #include "daemon/bindings.h"
 #include "daemon/worker.h"
 
+/** @internal Annotate for static checkers. */
+KR_NORETURN int lua_error (lua_State *L);
+
 /** @internal Prefix error with file:line */
 static int format_error(lua_State* L, const char *err)
 {
index ac937c358c0d01d0c454ed83049e5fb6cec3c02b..8d92c13da28c239105fa50e8e560d7d4851cb550 100644 (file)
@@ -37,6 +37,9 @@
 #define lua_rawlen(L, obj) lua_objlen((L), (obj))
 #endif
 
+/** @internal Annotate for static checkers. */
+KR_NORETURN int lua_error (lua_State *L);
+
 /*
  * Global bindings.
  */
index 853a229bf33bf8cb39499d4cde1c7e6d8fbb25cc..c70c279f980c1657884cb8d0a05ce40162e8d7ae 100644 (file)
 #define KR_EXPORT __attribute__ ((visibility ("default")))
 #define KR_CONST __attribute__((__const__))
 #define KR_PURE __attribute__((__pure__))
+#define KR_NORETURN __attribute__((__noreturn__))
 #else
 #define KR_EXPORT
 #define KR_CONST
 #define KR_PURE
+#define KR_NORETURN
 #endif
 
 /*