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

Submitted by Daniel Stone on Aug. 29, 2018, 6:17 a.m.

Details

Message ID 20180829061715.27776-3-daniels@collabora.com
State Accepted
Commit 5fab243a729c949d38463c47040ea6abec8d7850
Headers show
Series "Minor test/scanner fixes" ( rev: 1 ) in Wayland (DEPRECATED)

Not browsing as part of any series.

Commit Message

Daniel Stone Aug. 29, 2018, 6:17 a.m.
Help static analysers by letting them know that once we fail(),
execution will terminally complete.

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

Patch hide | download patch | download mbox

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;