diff options
author | Brent Cook <busterb@gmail.com> | 2017-01-15 10:15:51 -0600 |
---|---|---|
committer | Brent Cook <busterb@gmail.com> | 2017-01-15 16:00:17 -0600 |
commit | 057e7a85b903e431fa6a7236bb739d04a6e7a9c5 (patch) | |
tree | 05c06add4657b12eb4facfe7b53eb2d5d2ab71ca /include | |
parent | 69e2a7fb75ad5c833574c44e8364fb7e88e3788a (diff) | |
download | portable-057e7a85b903e431fa6a7236bb739d04a6e7a9c5.tar.gz portable-057e7a85b903e431fa6a7236bb739d04a6e7a9c5.tar.bz2 portable-057e7a85b903e431fa6a7236bb739d04a6e7a9c5.zip |
add noreturn attribute to compat functions
Diffstat (limited to 'include')
-rw-r--r-- | include/compat/err.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/compat/err.h b/include/compat/err.h index 65a760f..3a5e01f 100644 --- a/include/compat/err.h +++ b/include/compat/err.h | |||
@@ -18,6 +18,11 @@ | |||
18 | #include <stdio.h> | 18 | #include <stdio.h> |
19 | #include <string.h> | 19 | #include <string.h> |
20 | 20 | ||
21 | #if defined(_MSC_VER) | ||
22 | __declspec(noreturn) | ||
23 | #else | ||
24 | __attribute__((noreturn)) | ||
25 | #endif | ||
21 | static inline void | 26 | static inline void |
22 | err(int eval, const char *fmt, ...) | 27 | err(int eval, const char *fmt, ...) |
23 | { | 28 | { |
@@ -34,6 +39,11 @@ err(int eval, const char *fmt, ...) | |||
34 | va_end(ap); | 39 | va_end(ap); |
35 | } | 40 | } |
36 | 41 | ||
42 | #if defined(_MSC_VER) | ||
43 | __declspec(noreturn) | ||
44 | #else | ||
45 | __attribute__((noreturn)) | ||
46 | #endif | ||
37 | static inline void | 47 | static inline void |
38 | errx(int eval, const char *fmt, ...) | 48 | errx(int eval, const char *fmt, ...) |
39 | { | 49 | { |