extern int exim_chown_failure(int, const uschar*, uid_t, gid_t);
extern const uschar * exim_errstr(int);
-extern void exim_exit(int, const uschar *);
+extern void exim_exit(int, const uschar *) NORETURN;
extern void exim_nullstd(void);
extern void exim_setugid(uid_t, gid_t, BOOL, uschar *);
extern void exim_wait_tick(struct timeval *, int);
extern uschar *readconf_retry_error(const uschar *, const uschar *, int *, int *);
extern void readconf_save_config(const uschar *);
extern void read_message_body(BOOL);
-extern void receive_bomb_out(uschar *, uschar *);
+extern void receive_bomb_out(uschar *, uschar *) NORETURN;
extern BOOL receive_check_fs(int);
extern BOOL receive_check_set_sender(uschar *);
extern BOOL receive_msg(BOOL);
extern void sigalrm_handler(int);
extern BOOL smtp_buffered(void);
extern void smtp_closedown(uschar *);
-extern void smtp_command_timeout_exit(void);
-extern void smtp_command_sigterm_exit(void);
-extern void smtp_data_timeout_exit(void);
-extern void smtp_data_sigint_exit(void);
+extern void smtp_command_timeout_exit(void) NORETURN;
+extern void smtp_command_sigterm_exit(void) NORETURN;
+extern void smtp_data_timeout_exit(void) NORETURN;
+extern void smtp_data_sigint_exit(void) NORETURN;
extern uschar *smtp_cmd_hist(void);
extern int smtp_connect(smtp_connect_args *, const blob *);
extern int smtp_sock_connect(host_item *, int, int, uschar *,
extern int smtp_handle_acl_fail(int, int, uschar *, uschar *);
extern void smtp_log_no_mail(void);
extern void smtp_message_code(uschar **, int *, uschar **, uschar **, BOOL);
-extern void smtp_proxy_tls(void *, uschar *, size_t, int *, int);
+extern void smtp_proxy_tls(void *, uschar *, size_t, int *, int) NORETURN;
extern BOOL smtp_read_response(void *, uschar *, int, int, int);
extern void smtp_reset(void *);
extern void smtp_respond(uschar *, int, BOOL, uschar *);
# define PRINTF_FUNCTION(A,B) __attribute__((format(printf,A,B)))
# define ARG_UNUSED __attribute__((__unused__))
# define WARN_UNUSED_RESULT __attribute__((__warn_unused_result__))
+# define ALLOC __attribute__((malloc))
+# define ALLOC_SIZE(A) __attribute__((alloc_size(A)))
+# define NORETURN __attribute__((noreturn))
#else
# define PRINTF_FUNCTION(A,B)
-# define ARG_UNUSED /**/
-# define WARN_UNUSED_RESULT /**/
+# define ARG_UNUSED /**/
+# define WARN_UNUSED_RESULT /**/
+# define ALLOC /**/
+# define ALLOC_SIZE(A) /**/
+# define NORETURN /**/
#endif
#ifdef WANT_DEEPER_PRINTF_CHECKS
/* The value of the 2nd arg is __FILE__ in every call, so give its correct type */
extern BOOL store_extend_3(void *, int, int, const char *, int);
extern void store_free_3(void *, const char *, int);
-extern void *store_get_3(int, const char *, int);
-extern void *store_get_perm_3(int, const char *, int);
-extern void *store_malloc_3(int, const char *, int);
+extern void *store_get_3(int, const char *, int) ALLOC ALLOC_SIZE(1) WARN_UNUSED_RESULT;
+extern void *store_get_perm_3(int, const char *, int) ALLOC ALLOC_SIZE(1) WARN_UNUSED_RESULT;
+extern void *store_malloc_3(int, const char *, int) ALLOC ALLOC_SIZE(1) WARN_UNUSED_RESULT;
extern void *store_newblock_3(void *, int, int, const char *, int);
extern void store_reset_3(void *, const char *, int);