Mercurial > dropbear
comparison libtomcrypt/src/headers/tomcrypt_argchk.h @ 1043:38d2f6b2d1b8
Add more ATTRIB_NORETURN annotations, from Thorsten Horstmann
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 24 Feb 2015 22:36:20 +0800 |
parents | 0cbe8f6dbf9e |
children | f849a5ca2efc |
comparison
equal
deleted
inserted
replaced
1042:9699b9438ad9 | 1043:38d2f6b2d1b8 |
---|---|
2 /* ARGTYPE is defined in mycrypt_cfg.h */ | 2 /* ARGTYPE is defined in mycrypt_cfg.h */ |
3 #if ARGTYPE == 0 | 3 #if ARGTYPE == 0 |
4 | 4 |
5 #include <signal.h> | 5 #include <signal.h> |
6 | 6 |
7 /* portability macros for compiler-specific code attributes */ | |
8 #ifdef __GNUC__ | |
9 #define ATTRIB_NORETURN __attribute__((noreturn)) | |
10 #else | |
11 #define ATTRIB_NORETURN | |
12 #endif | |
13 | |
14 | |
7 /* this is the default LibTomCrypt macro */ | 15 /* this is the default LibTomCrypt macro */ |
8 void crypt_argchk(char *v, char *s, int d); | 16 void crypt_argchk(char *v, char *s, int d) ATTRIB_NORETURN; |
9 #define LTC_ARGCHK(x) if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); } | 17 #define LTC_ARGCHK(x) if (!(x)) { crypt_argchk(#x, __FILE__, __LINE__); } |
10 #define LTC_ARGCHKVD(x) LTC_ARGCHK(x) | 18 #define LTC_ARGCHKVD(x) LTC_ARGCHK(x) |
11 | 19 |
12 #elif ARGTYPE == 1 | 20 #elif ARGTYPE == 1 |
13 | 21 |