Commit a5e50b263a54a41239a90930c1a27ecb76531e1b
1 parent
173a543b
Replace noreturn with QEMU_NORETURN
Thanks to Robert Riebisch for analysis [1] [1] http://marc.info/?l=qemu-devel&m=123352293319271&w=2 git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6492 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
8 changed files
with
12 additions
and
12 deletions
cpu-all.h
| @@ -753,7 +753,7 @@ void cpu_dump_statistics (CPUState *env, FILE *f, | @@ -753,7 +753,7 @@ void cpu_dump_statistics (CPUState *env, FILE *f, | ||
| 753 | int (*cpu_fprintf)(FILE *f, const char *fmt, ...), | 753 | int (*cpu_fprintf)(FILE *f, const char *fmt, ...), |
| 754 | int flags); | 754 | int flags); |
| 755 | 755 | ||
| 756 | -void noreturn cpu_abort(CPUState *env, const char *fmt, ...) | 756 | +void QEMU_NORETURN cpu_abort(CPUState *env, const char *fmt, ...) |
| 757 | __attribute__ ((__format__ (__printf__, 2, 3))); | 757 | __attribute__ ((__format__ (__printf__, 2, 3))); |
| 758 | extern CPUState *first_cpu; | 758 | extern CPUState *first_cpu; |
| 759 | extern CPUState *cpu_single_env; | 759 | extern CPUState *cpu_single_env; |
darwin-user/signal.c
| @@ -133,7 +133,7 @@ static inline void free_sigqueue(struct sigqueue *q) | @@ -133,7 +133,7 @@ static inline void free_sigqueue(struct sigqueue *q) | ||
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | /* abort execution with signal */ | 135 | /* abort execution with signal */ |
| 136 | -void noreturn force_sig(int sig) | 136 | +void QEMU_NORETURN force_sig(int sig) |
| 137 | { | 137 | { |
| 138 | int host_sig; | 138 | int host_sig; |
| 139 | host_sig = target_to_host_signal(sig); | 139 | host_sig = target_to_host_signal(sig); |
exec-all.h
| @@ -85,7 +85,7 @@ TranslationBlock *tb_gen_code(CPUState *env, | @@ -85,7 +85,7 @@ TranslationBlock *tb_gen_code(CPUState *env, | ||
| 85 | target_ulong pc, target_ulong cs_base, int flags, | 85 | target_ulong pc, target_ulong cs_base, int flags, |
| 86 | int cflags); | 86 | int cflags); |
| 87 | void cpu_exec_init(CPUState *env); | 87 | void cpu_exec_init(CPUState *env); |
| 88 | -void noreturn cpu_loop_exit(void); | 88 | +void QEMU_NORETURN cpu_loop_exit(void); |
| 89 | int page_unprotect(target_ulong address, unsigned long pc, void *puc); | 89 | int page_unprotect(target_ulong address, unsigned long pc, void *puc); |
| 90 | void tb_invalidate_phys_page_range(target_phys_addr_t start, target_phys_addr_t end, | 90 | void tb_invalidate_phys_page_range(target_phys_addr_t start, target_phys_addr_t end, |
| 91 | int is_cpu_write_access); | 91 | int is_cpu_write_access); |
linux-user/signal.c
| @@ -349,7 +349,7 @@ static inline void free_sigqueue(CPUState *env, struct sigqueue *q) | @@ -349,7 +349,7 @@ static inline void free_sigqueue(CPUState *env, struct sigqueue *q) | ||
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | /* abort execution with signal */ | 351 | /* abort execution with signal */ |
| 352 | -static void noreturn force_sig(int sig) | 352 | +static void QEMU_NORETURN force_sig(int sig) |
| 353 | { | 353 | { |
| 354 | int host_sig; | 354 | int host_sig; |
| 355 | host_sig = target_to_host_signal(sig); | 355 | host_sig = target_to_host_signal(sig); |
qemu-common.h
| @@ -8,9 +8,9 @@ | @@ -8,9 +8,9 @@ | ||
| 8 | #include <windows.h> | 8 | #include <windows.h> |
| 9 | #endif | 9 | #endif |
| 10 | 10 | ||
| 11 | -#define noreturn __attribute__ ((__noreturn__)) | 11 | +#define QEMU_NORETURN __attribute__ ((__noreturn__)) |
| 12 | 12 | ||
| 13 | -/* Hack around the mess dyngen-exec.h causes: We need noreturn in files that | 13 | +/* Hack around the mess dyngen-exec.h causes: We need QEMU_NORETURN in files that |
| 14 | cannot include the following headers without conflicts. This condition has | 14 | cannot include the following headers without conflicts. This condition has |
| 15 | to be removed once dyngen is gone. */ | 15 | to be removed once dyngen is gone. */ |
| 16 | #ifndef __DYNGEN_EXEC_H__ | 16 | #ifndef __DYNGEN_EXEC_H__ |
| @@ -144,7 +144,7 @@ void *get_mmap_addr(unsigned long size); | @@ -144,7 +144,7 @@ void *get_mmap_addr(unsigned long size); | ||
| 144 | 144 | ||
| 145 | /* Error handling. */ | 145 | /* Error handling. */ |
| 146 | 146 | ||
| 147 | -void noreturn hw_error(const char *fmt, ...) | 147 | +void QEMU_NORETURN hw_error(const char *fmt, ...) |
| 148 | __attribute__ ((__format__ (__printf__, 1, 2))); | 148 | __attribute__ ((__format__ (__printf__, 1, 2))); |
| 149 | 149 | ||
| 150 | /* IO callbacks. */ | 150 | /* IO callbacks. */ |
qemu-img.c
| @@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
| 34 | /* Default to cache=writeback as data integrity is not important for qemu-tcg. */ | 34 | /* Default to cache=writeback as data integrity is not important for qemu-tcg. */ |
| 35 | #define BRDV_O_FLAGS BDRV_O_CACHE_WB | 35 | #define BRDV_O_FLAGS BDRV_O_CACHE_WB |
| 36 | 36 | ||
| 37 | -static void noreturn error(const char *fmt, ...) | 37 | +static void QEMU_NORETURN error(const char *fmt, ...) |
| 38 | { | 38 | { |
| 39 | va_list ap; | 39 | va_list ap; |
| 40 | va_start(ap, fmt); | 40 | va_start(ap, fmt); |
target-i386/exec.h
| @@ -63,8 +63,8 @@ void do_interrupt(int intno, int is_int, int error_code, | @@ -63,8 +63,8 @@ void do_interrupt(int intno, int is_int, int error_code, | ||
| 63 | target_ulong next_eip, int is_hw); | 63 | target_ulong next_eip, int is_hw); |
| 64 | void do_interrupt_user(int intno, int is_int, int error_code, | 64 | void do_interrupt_user(int intno, int is_int, int error_code, |
| 65 | target_ulong next_eip); | 65 | target_ulong next_eip); |
| 66 | -void noreturn raise_exception_err(int exception_index, int error_code); | ||
| 67 | -void noreturn raise_exception(int exception_index); | 66 | +void QEMU_NORETURN raise_exception_err(int exception_index, int error_code); |
| 67 | +void QEMU_NORETURN raise_exception(int exception_index); | ||
| 68 | void do_smm_enter(void); | 68 | void do_smm_enter(void); |
| 69 | 69 | ||
| 70 | /* n must be a constant to be efficient */ | 70 | /* n must be a constant to be efficient */ |
target-i386/op_helper.c
| @@ -1303,8 +1303,8 @@ static int check_exception(int intno, int *error_code) | @@ -1303,8 +1303,8 @@ static int check_exception(int intno, int *error_code) | ||
| 1303 | * EIP value AFTER the interrupt instruction. It is only relevant if | 1303 | * EIP value AFTER the interrupt instruction. It is only relevant if |
| 1304 | * is_int is TRUE. | 1304 | * is_int is TRUE. |
| 1305 | */ | 1305 | */ |
| 1306 | -static void noreturn raise_interrupt(int intno, int is_int, int error_code, | ||
| 1307 | - int next_eip_addend) | 1306 | +static void QEMU_NORETURN raise_interrupt(int intno, int is_int, int error_code, |
| 1307 | + int next_eip_addend) | ||
| 1308 | { | 1308 | { |
| 1309 | if (!is_int) { | 1309 | if (!is_int) { |
| 1310 | helper_svm_check_intercept_param(SVM_EXIT_EXCP_BASE + intno, error_code); | 1310 | helper_svm_check_intercept_param(SVM_EXIT_EXCP_BASE + intno, error_code); |