diff options
author | Josh Cartwright <joshc@ni.com> | 2015-08-31 11:35:35 -0500 |
---|---|---|
committer | John Kacur <jkacur@redhat.com> | 2015-09-17 21:19:47 +0200 |
commit | b49f58efd6c22ddf2c739d9f8a7b0d35de485996 (patch) | |
tree | c0c41f1551823b18b5768a9211be4c149596f560 | |
parent | 10aeea73b434bf6b06d5ebb1631ac53b0b1076bb (diff) | |
download | rt-tests-b49f58efd6c22ddf2c739d9f8a7b0d35de485996.tar.gz |
error: mark fatal, err_exit, err_quit as being noreturn
These functions never return to their caller. Mark them as such to aide
in code generation and help out static analysis.
Signed-off-by: Josh Cartwright <joshc@ni.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r-- | src/include/error.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/error.h b/src/include/error.h index ae05a2e..4acff49 100644 --- a/src/include/error.h +++ b/src/include/error.h @@ -6,14 +6,14 @@ #include <stdarg.h> #include <string.h> -void err_exit(int err, char *fmt, ...); +void err_exit(int err, char *fmt, ...) __attribute__((noreturn)); void err_msg(char *fmt, ...); void err_msg_n(int err, char *fmt, ...); -void err_quit(char *fmt, ...); +void err_quit(char *fmt, ...) __attribute__((noreturn)); void debug(char *fmt, ...); void info(char *fmt, ...); void warn(char *fmt, ...); -void fatal(char *fmt, ...); +void fatal(char *fmt, ...) __attribute__((noreturn)); void err_doit(int err, const char *fmt, va_list ap); #endif /* __ERROR_H */ |