Add more ATTRIB_NORETURN annotations, from Thorsten Horstmann

This commit is contained in:
Matt Johnston
2015-02-24 22:36:20 +08:00
parent 9adfff5c1a
commit 1809f741cb
3 changed files with 14 additions and 6 deletions

View File

@@ -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)