diff options
author | Matt Johnston <matt@ucc.asn.au> | 2015-02-24 22:36:20 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2015-02-24 22:36:20 +0800 |
commit | 1809f741cba865b03d4db5c4ba8c41364a55d6bc (patch) | |
tree | e740403492a14a039b0b85c61d0bcd619390eae3 /libtomcrypt | |
parent | 9adfff5c1a68f819f34c15a5cf84b381b7723634 (diff) |
Add more ATTRIB_NORETURN annotations, from Thorsten Horstmann
Diffstat (limited to 'libtomcrypt')
-rw-r--r-- | libtomcrypt/src/headers/tomcrypt_argchk.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libtomcrypt/src/headers/tomcrypt_argchk.h b/libtomcrypt/src/headers/tomcrypt_argchk.h index cfc93ad..38e1bdd 100644 --- a/libtomcrypt/src/headers/tomcrypt_argchk.h +++ b/libtomcrypt/src/headers/tomcrypt_argchk.h @@ -4,8 +4,16 @@ #include <signal.h> +/* portability macros for compiler-specific code attributes */ +#ifdef __GNUC__ +#define ATTRIB_NORETURN __attribute__((noreturn)) +#else +#define ATTRIB_NORETURN +#endif + + /* this is the default LibTomCrypt macro */ -void crypt_argchk(char *v, char *s, int d); +void crypt_argchk(char *v, char *s, int d) ATTRIB_NORETURN; #define LTC_ARGCHK(x) if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); } #define LTC_ARGCHKVD(x) LTC_ARGCHK(x) |