[PATCH wayland 2/6] scanner: Mark fail() as noreturn

Daniel Stone daniels at collabora.com
Wed Aug 29 06:17:11 UTC 2018


Help static analysers by letting them know that once we fail(),
execution will terminally complete.

Signed-off-by: Daniel Stone <daniels at collabora.com>
---
 src/scanner.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/scanner.c b/src/scanner.c
index 3afc3d3d..084f196d 100644
--- a/src/scanner.c
+++ b/src/scanner.c
@@ -371,7 +371,7 @@ desc_dump(char *desc, const char *fmt, ...)
 	putchar('\n');
 }
 
-static void
+static void __attribute__ ((noreturn))
 fail(struct location *loc, const char *msg, ...)
 {
 	va_list ap;
-- 
2.17.1



More information about the wayland-devel mailing list