diff options
author | Rob Landley <rob@landley.net> | 2022-05-13 00:27:31 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-05-13 00:27:31 +0000 |
commit | 8b161a86233b494e81ffd08e6266efec8e7a0851 (patch) | |
tree | d8e24f25ff687d25704ee2a45ab5e25159e08cac | |
parent | a30dc69f0f91476e8b3acf750d82908c9711724c (diff) | |
parent | ee301d5ded4a4040e28e561c6c3bac556c88d7e2 (diff) | |
download | toybox-8b161a86233b494e81ffd08e6266efec8e7a0851.tar.gz |
Switch to C11 noreturn to work around a compiler bug in llvm. am: ee301d5ded
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/toybox/+/18350067
Change-Id: Ie88ab94fb3bbf1a31072d27f0e16aed0897f130a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | lib/lib.h | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -114,8 +114,8 @@ struct dirtree *dirtree_read(char *path, int (*callback)(struct dirtree *node)); // xwrap.c void xstrncpy(char *dest, char *src, size_t size); void xstrncat(char *dest, char *src, size_t size); -void _xexit(void) __attribute__((__noreturn__)); -void xexit(void) __attribute__((__noreturn__)); +_Noreturn void _xexit(void); +_Noreturn void xexit(void); void *xmmap(void *addr, size_t length, int prot, int flags, int fd, off_t off); void *xmalloc(size_t size); void *xzalloc(size_t size); @@ -194,13 +194,13 @@ time_t xmktime(struct tm *tm, int utc); void verror_msg(char *msg, int err, va_list va); void error_msg(char *msg, ...) printf_format; void perror_msg(char *msg, ...) printf_format; -void error_exit(char *msg, ...) printf_format __attribute__((__noreturn__)); -void perror_exit(char *msg, ...) printf_format __attribute__((__noreturn__)); -void help_exit(char *msg, ...) printf_format __attribute__((__noreturn__)); +_Noreturn void error_exit(char *msg, ...) printf_format; +_Noreturn void perror_exit(char *msg, ...) printf_format; +_Noreturn void help_exit(char *msg, ...) printf_format; void error_msg_raw(char *msg); void perror_msg_raw(char *msg); -void error_exit_raw(char *msg) __attribute__((__noreturn__)); -void perror_exit_raw(char *msg) __attribute__((__noreturn__)); +_Noreturn void error_exit_raw(char *msg); +_Noreturn void perror_exit_raw(char *msg); ssize_t readall(int fd, void *buf, size_t len); ssize_t writeall(int fd, void *buf, size_t len); off_t lskip(int fd, off_t offset); |