Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/defs.h
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2018-12-01 13:33:08 +0300
committerSimon Tatham <anakin@pobox.com>2018-12-01 19:59:24 +0300
commitd2ff9482073294632d936e89c0eca59591bf872d (patch)
treed429b5f36705495df2dca3645cf6dd7bb3f9dd74 /defs.h
parent144b738f31d53871dcb7ac95a9c1412cff5d76b7 (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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/defs.h b/defs.h
index f97d56fc..19d501a5 100644
--- a/defs.h
+++ b/defs.h
@@ -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 */