diff options
author | Simon Tatham <anakin@pobox.com> | 2018-12-01 13:33:08 +0300 |
---|---|---|
committer | Simon Tatham <anakin@pobox.com> | 2018-12-01 19:59:24 +0300 |
commit | d2ff9482073294632d936e89c0eca59591bf872d (patch) | |
tree | d429b5f36705495df2dca3645cf6dd7bb3f9dd74 /defs.h | |
parent | 144b738f31d53871dcb7ac95a9c1412cff5d76b7 (diff) |
Mark a few functions as __attribute__((noreturn)).
This is mostly to make static analysers and compiler warnings a bit
happier - now they know that a call to, say, modalfatalbox() means
they don't have to worry about what the rest of the function will do.
Diffstat (limited to 'defs.h')
-rw-r--r-- | defs.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -113,4 +113,10 @@ typedef struct PacketProtocolLayer PacketProtocolLayer; TYPECHECK(object == &((type *)0)->field, \ ((type *)(((char *)(object)) - offsetof(type, field)))) +#if defined __GNUC__ || defined __clang__ +#define NORETURN __attribute__((__noreturn__)) +#else +#define NORETURN +#endif + #endif /* PUTTY_DEFS_H */ |