diff options
-rw-r--r-- | apps/main.c | 43 | ||||
-rw-r--r-- | apps/plugins/frotz/frotz.h | 2 | ||||
-rw-r--r-- | apps/recorder/pcm_record.c | 5 | ||||
-rw-r--r-- | apps/root_menu.h | 6 | ||||
-rw-r--r-- | bootloader/gigabeat-s.c | 3 | ||||
-rw-r--r-- | bootloader/sansa_as3525.c | 3 | ||||
-rw-r--r-- | firmware/export/thread.h | 3 | ||||
-rw-r--r-- | firmware/include/gcc_extensions.h | 7 | ||||
-rw-r--r-- | firmware/scroll_engine.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sd-as3525.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sd-as3525v2.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/ata-sd-pp.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/system-gigabeat-s.c | 5 | ||||
-rw-r--r-- | firmware/target/arm/imx31/rolo_restart_firmware.S | 2 | ||||
-rw-r--r-- | firmware/target/arm/s3c2440/sd-s3c2440.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/system-arm.c | 3 | ||||
-rw-r--r-- | firmware/target/arm/tcc780x/sd-tcc780x.c | 3 | ||||
-rw-r--r-- | firmware/target/coldfire/system-coldfire.c | 3 | ||||
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c | 3 |
19 files changed, 71 insertions, 35 deletions
diff --git a/apps/main.c b/apps/main.c index 67cd6d2f0d..ceaa85f38f 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -20,6 +20,7 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "config.h" | 21 | #include "config.h" |
22 | 22 | ||
23 | #include "gcc_extensions.h" | ||
23 | #include "storage.h" | 24 | #include "storage.h" |
24 | #include "disk.h" | 25 | #include "disk.h" |
25 | #include "fat.h" | 26 | #include "fat.h" |
@@ -112,35 +113,41 @@ | |||
112 | #include "m5636.h" | 113 | #include "m5636.h" |
113 | #endif | 114 | #endif |
114 | 115 | ||
116 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | ||
117 | #define MAIN_NORETURN_ATTR NORETURN_ATTR | ||
118 | #else | ||
119 | /* gcc adds an implicit 'return 0;' at the end of main(), causing a warning | ||
120 | * with noreturn attribute */ | ||
121 | #define MAIN_NORETURN_ATTR | ||
122 | #endif | ||
123 | |||
115 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) | 124 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
116 | #include "sim_tasks.h" | 125 | #include "sim_tasks.h" |
117 | #endif | 126 | #endif |
118 | 127 | ||
119 | #ifdef HAVE_SDL | 128 | #if (CONFIG_PLATFORM & PLATFORM_SDL) |
120 | #include "system-sdl.h" | 129 | #include "system-sdl.h" |
130 | #define HAVE_ARGV_MAIN | ||
131 | /* Don't use SDL_main on windows -> no more stdio redirection */ | ||
132 | #if defined(WIN32) | ||
133 | #undef main | ||
134 | #endif | ||
121 | #endif | 135 | #endif |
122 | 136 | ||
123 | /*#define AUTOROCK*/ /* define this to check for "autostart.rock" on boot */ | 137 | /*#define AUTOROCK*/ /* define this to check for "autostart.rock" on boot */ |
124 | 138 | ||
125 | static void init(void); | 139 | static void init(void); |
126 | |||
127 | #ifdef HAVE_SDL | ||
128 | #if defined(WIN32) && defined(main) | ||
129 | /* Don't use SDL_main on windows -> no more stdio redirection */ | ||
130 | #undef main | ||
131 | #endif | ||
132 | int main(int argc, char *argv[]) | ||
133 | { | ||
134 | #ifdef APPLICATION | ||
135 | paths_init(); | ||
136 | #endif | ||
137 | sys_handle_argv(argc, argv); | ||
138 | #else | ||
139 | /* main(), and various functions called by main() and init() may be | 140 | /* main(), and various functions called by main() and init() may be |
140 | * be INIT_ATTR. These functions must not be called after the final call | 141 | * be INIT_ATTR. These functions must not be called after the final call |
141 | * to root_menu() at the end of main() | 142 | * to root_menu() at the end of main() |
142 | * see definition of INIT_ATTR in config.h */ | 143 | * see definition of INIT_ATTR in config.h */ |
143 | int main(void) INIT_ATTR __attribute__((noreturn)); | 144 | #ifdef HAVE_ARGV_MAIN |
145 | int main(int argc, char *argv[]) INIT_ATTR MAIN_NORETURN_ATTR ; | ||
146 | int main(int argc, char *argv[]) | ||
147 | { | ||
148 | sys_handle_argv(argc, argv); | ||
149 | #else | ||
150 | int main(void) INIT_ATTR MAIN_NORETURN_ATTR; | ||
144 | int main(void) | 151 | int main(void) |
145 | { | 152 | { |
146 | #endif | 153 | #endif |
@@ -328,6 +335,9 @@ static void init_tagcache(void) | |||
328 | 335 | ||
329 | static void init(void) | 336 | static void init(void) |
330 | { | 337 | { |
338 | #ifdef APPLICATION | ||
339 | paths_init(); | ||
340 | #endif | ||
331 | system_init(); | 341 | system_init(); |
332 | kernel_init(); | 342 | kernel_init(); |
333 | buffer_init(); | 343 | buffer_init(); |
@@ -707,7 +717,8 @@ static void init(void) | |||
707 | } | 717 | } |
708 | 718 | ||
709 | #ifdef CPU_PP | 719 | #ifdef CPU_PP |
710 | void __attribute__((noreturn)) cop_main(void) | 720 | void cop_main(void) MAIN_NORETURN_ATTR; |
721 | void cop_main(void) | ||
711 | { | 722 | { |
712 | /* This is the entry point for the coprocessor | 723 | /* This is the entry point for the coprocessor |
713 | Anyone not running an upgraded bootloader will never reach this point, | 724 | Anyone not running an upgraded bootloader will never reach this point, |
diff --git a/apps/plugins/frotz/frotz.h b/apps/plugins/frotz/frotz.h index bc8869cd24..ef3a39d2ce 100644 --- a/apps/plugins/frotz/frotz.h +++ b/apps/plugins/frotz/frotz.h | |||
@@ -553,7 +553,7 @@ void os_display_char (zchar); | |||
553 | void os_display_string (const zchar *); | 553 | void os_display_string (const zchar *); |
554 | void os_draw_picture (int, int, int); | 554 | void os_draw_picture (int, int, int); |
555 | void os_erase_area (int, int, int, int); | 555 | void os_erase_area (int, int, int, int); |
556 | void os_fatal (const char *) __attribute__((noreturn)); | 556 | void os_fatal (const char *) NORETURN_ATTR; |
557 | void os_finish_with_sample (int); | 557 | void os_finish_with_sample (int); |
558 | int os_font_data (int, int *, int *); | 558 | int os_font_data (int, int *, int *); |
559 | void os_init_screen (void); | 559 | void os_init_screen (void); |
diff --git a/apps/recorder/pcm_record.c b/apps/recorder/pcm_record.c index 704d859e57..0221963b2b 100644 --- a/apps/recorder/pcm_record.c +++ b/apps/recorder/pcm_record.c | |||
@@ -18,6 +18,9 @@ | |||
18 | * KIND, either express or implied. | 18 | * KIND, either express or implied. |
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | |||
22 | #include "config.h" | ||
23 | #include "gcc_extensions.h" | ||
21 | #include "pcm_record.h" | 24 | #include "pcm_record.h" |
22 | #include "system.h" | 25 | #include "system.h" |
23 | #include "kernel.h" | 26 | #include "kernel.h" |
@@ -1458,7 +1461,7 @@ static void pcmrec_resume(void) | |||
1458 | logf("pcmrec_resume done"); | 1461 | logf("pcmrec_resume done"); |
1459 | } /* pcmrec_resume */ | 1462 | } /* pcmrec_resume */ |
1460 | 1463 | ||
1461 | static void pcmrec_thread(void) __attribute__((noreturn)); | 1464 | static void pcmrec_thread(void) NORETURN_ATTR; |
1462 | static void pcmrec_thread(void) | 1465 | static void pcmrec_thread(void) |
1463 | { | 1466 | { |
1464 | struct queue_event ev; | 1467 | struct queue_event ev; |
diff --git a/apps/root_menu.h b/apps/root_menu.h index 9674a73f50..739ec8c4e9 100644 --- a/apps/root_menu.h +++ b/apps/root_menu.h | |||
@@ -18,11 +18,13 @@ | |||
18 | * KIND, either express or implied. | 18 | * KIND, either express or implied. |
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include "config.h" | ||
22 | #ifndef __ROOT_MENU_H__ | 21 | #ifndef __ROOT_MENU_H__ |
23 | #define __ROOT_MENU_H__ | 22 | #define __ROOT_MENU_H__ |
24 | 23 | ||
25 | void root_menu(void) __attribute__((noreturn)); | 24 | #include "config.h" |
25 | #include "gcc_extensions.h" | ||
26 | |||
27 | void root_menu(void) NORETURN_ATTR; | ||
26 | 28 | ||
27 | enum { | 29 | enum { |
28 | /* from old menu api, but still required*/ | 30 | /* from old menu api, but still required*/ |
diff --git a/bootloader/gigabeat-s.c b/bootloader/gigabeat-s.c index b6db9e633f..9c5ad93d1f 100644 --- a/bootloader/gigabeat-s.c +++ b/bootloader/gigabeat-s.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include "system.h" | 22 | #include "system.h" |
23 | #include <stdio.h> | 23 | #include <stdio.h> |
24 | #include "kernel.h" | 24 | #include "kernel.h" |
25 | #include "gcc_extensions.h" | ||
25 | #include "string.h" | 26 | #include "string.h" |
26 | #include "adc.h" | 27 | #include "adc.h" |
27 | #include "powermgmt.h" | 28 | #include "powermgmt.h" |
@@ -296,7 +297,7 @@ static void handle_untar(void) | |||
296 | } | 297 | } |
297 | 298 | ||
298 | /* Try to load the firmware and run it */ | 299 | /* Try to load the firmware and run it */ |
299 | static void __attribute__((noreturn)) handle_firmware_load(void) | 300 | static void NORETURN_ATTR handle_firmware_load(void) |
300 | { | 301 | { |
301 | int rc = load_firmware(load_buf, BOOTFILE, | 302 | int rc = load_firmware(load_buf, BOOTFILE, |
302 | load_buf_size); | 303 | load_buf_size); |
diff --git a/bootloader/sansa_as3525.c b/bootloader/sansa_as3525.c index d8dc3f3936..140fa02a76 100644 --- a/bootloader/sansa_as3525.c +++ b/bootloader/sansa_as3525.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <system.h> | 26 | #include <system.h> |
27 | #include <inttypes.h> | 27 | #include <inttypes.h> |
28 | #include "config.h" | 28 | #include "config.h" |
29 | #include "gcc_extensions.h" | ||
29 | #include "lcd.h" | 30 | #include "lcd.h" |
30 | #ifdef USE_ROCKBOX_USB | 31 | #ifdef USE_ROCKBOX_USB |
31 | #include "usb.h" | 32 | #include "usb.h" |
@@ -70,7 +71,7 @@ static void usb_mode(void) | |||
70 | } | 71 | } |
71 | #endif /* USE_ROCKBOX_USB */ | 72 | #endif /* USE_ROCKBOX_USB */ |
72 | 73 | ||
73 | void main(void) __attribute__((noreturn)); | 74 | void main(void) NORETURN_ATTR; |
74 | void main(void) | 75 | void main(void) |
75 | { | 76 | { |
76 | unsigned char* loadbuffer; | 77 | unsigned char* loadbuffer; |
diff --git a/firmware/export/thread.h b/firmware/export/thread.h index 2853c0b121..c778f2c074 100644 --- a/firmware/export/thread.h +++ b/firmware/export/thread.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <inttypes.h> | 25 | #include <inttypes.h> |
26 | #include <stddef.h> | 26 | #include <stddef.h> |
27 | #include <stdbool.h> | 27 | #include <stdbool.h> |
28 | #include "gcc_extensions.h" | ||
28 | 29 | ||
29 | /* Priority scheduling (when enabled with HAVE_PRIORITY_SCHEDULING) works | 30 | /* Priority scheduling (when enabled with HAVE_PRIORITY_SCHEDULING) works |
30 | * by giving high priority threads more CPU time than lower priority threads | 31 | * by giving high priority threads more CPU time than lower priority threads |
@@ -385,7 +386,7 @@ void thread_thaw(unsigned int thread_id); | |||
385 | /* Wait for a thread to exit */ | 386 | /* Wait for a thread to exit */ |
386 | void thread_wait(unsigned int thread_id); | 387 | void thread_wait(unsigned int thread_id); |
387 | /* Exit the current thread */ | 388 | /* Exit the current thread */ |
388 | void thread_exit(void) __attribute__((noreturn)); | 389 | void thread_exit(void) NORETURN_ATTR; |
389 | #if defined(DEBUG) || defined(ROCKBOX_HAS_LOGF) | 390 | #if defined(DEBUG) || defined(ROCKBOX_HAS_LOGF) |
390 | #define ALLOW_REMOVE_THREAD | 391 | #define ALLOW_REMOVE_THREAD |
391 | /* Remove a thread from the scheduler */ | 392 | /* Remove a thread from the scheduler */ |
diff --git a/firmware/include/gcc_extensions.h b/firmware/include/gcc_extensions.h index a58c2e7e45..f7580f6ddc 100644 --- a/firmware/include/gcc_extensions.h +++ b/firmware/include/gcc_extensions.h | |||
@@ -43,4 +43,11 @@ | |||
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | 45 | ||
46 | #if defined(__GNUC__) && (__GNUC__ >= 3 || \ | ||
47 | (__GNUC__ >= 2 && __GNUC_MINOR__ >= 5)) | ||
48 | #define NORETURN_ATTR __attribute__((noreturn)) | ||
49 | #else | ||
50 | #define NORETURN_ATTR | ||
51 | #endif | ||
52 | |||
46 | #endif /* _GCC_EXTENSIONS_H_ */ | 53 | #endif /* _GCC_EXTENSIONS_H_ */ |
diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c index fb1628a9c4..70bbcbeae1 100644 --- a/firmware/scroll_engine.c +++ b/firmware/scroll_engine.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * | 23 | * |
24 | ****************************************************************************/ | 24 | ****************************************************************************/ |
25 | #include "config.h" | 25 | #include "config.h" |
26 | #include "gcc_extensions.h" | ||
26 | #include "cpu.h" | 27 | #include "cpu.h" |
27 | #include "kernel.h" | 28 | #include "kernel.h" |
28 | #include "thread.h" | 29 | #include "thread.h" |
@@ -257,7 +258,7 @@ static bool scroll_process_message(int delay) | |||
257 | } | 258 | } |
258 | #endif /* HAVE_REMOTE_LCD */ | 259 | #endif /* HAVE_REMOTE_LCD */ |
259 | 260 | ||
260 | static void scroll_thread(void) __attribute__((noreturn)); | 261 | static void scroll_thread(void) NORETURN_ATTR; |
261 | #ifdef HAVE_REMOTE_LCD | 262 | #ifdef HAVE_REMOTE_LCD |
262 | 263 | ||
263 | static void scroll_thread(void) | 264 | static void scroll_thread(void) |
diff --git a/firmware/target/arm/as3525/sd-as3525.c b/firmware/target/arm/as3525/sd-as3525.c index d77c7133b6..ff41ef6215 100644 --- a/firmware/target/arm/as3525/sd-as3525.c +++ b/firmware/target/arm/as3525/sd-as3525.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <stdio.h> | 32 | #include <stdio.h> |
33 | #include <stdlib.h> | 33 | #include <stdlib.h> |
34 | #include <string.h> | 34 | #include <string.h> |
35 | #include "gcc_extensions.h" | ||
35 | #include "as3525.h" | 36 | #include "as3525.h" |
36 | #include "pl180.h" /* SD controller */ | 37 | #include "pl180.h" /* SD controller */ |
37 | #include "pl081.h" /* DMA controller */ | 38 | #include "pl081.h" /* DMA controller */ |
@@ -432,7 +433,7 @@ static int sd_init_card(const int drive) | |||
432 | return 0; | 433 | return 0; |
433 | } | 434 | } |
434 | 435 | ||
435 | static void sd_thread(void) __attribute__((noreturn)); | 436 | static void sd_thread(void) NORETURN_ATTR; |
436 | static void sd_thread(void) | 437 | static void sd_thread(void) |
437 | { | 438 | { |
438 | struct queue_event ev; | 439 | struct queue_event ev; |
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c index 1f8044a18b..e8a0719b11 100644 --- a/firmware/target/arm/as3525/sd-as3525v2.c +++ b/firmware/target/arm/as3525/sd-as3525v2.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "config.h" /* for HAVE_MULTIVOLUME */ | 23 | #include "config.h" /* for HAVE_MULTIVOLUME */ |
24 | #include "fat.h" | 24 | #include "fat.h" |
25 | #include "thread.h" | 25 | #include "thread.h" |
26 | #include "gcc_extensions.h" | ||
26 | #include "led.h" | 27 | #include "led.h" |
27 | #include "sdmmc.h" | 28 | #include "sdmmc.h" |
28 | #include "system.h" | 29 | #include "system.h" |
@@ -616,7 +617,7 @@ static int sd_init_card(const int drive) | |||
616 | return 0; | 617 | return 0; |
617 | } | 618 | } |
618 | 619 | ||
619 | static void sd_thread(void) __attribute__((noreturn)); | 620 | static void sd_thread(void) NORETURN_ATTR; |
620 | static void sd_thread(void) | 621 | static void sd_thread(void) |
621 | { | 622 | { |
622 | struct queue_event ev; | 623 | struct queue_event ev; |
diff --git a/firmware/target/arm/ata-sd-pp.c b/firmware/target/arm/ata-sd-pp.c index a2dcfe518f..914858e464 100644 --- a/firmware/target/arm/ata-sd-pp.c +++ b/firmware/target/arm/ata-sd-pp.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include "config.h" /* for HAVE_MULTIDRIVE */ | 21 | #include "config.h" /* for HAVE_MULTIDRIVE */ |
22 | #include "fat.h" | 22 | #include "fat.h" |
23 | #include "sdmmc.h" | 23 | #include "sdmmc.h" |
24 | #include "gcc_extensions.h" | ||
24 | #ifdef HAVE_HOTSWAP | 25 | #ifdef HAVE_HOTSWAP |
25 | #include "sd-pp-target.h" | 26 | #include "sd-pp-target.h" |
26 | #endif | 27 | #endif |
@@ -1105,7 +1106,7 @@ sd_write_error: | |||
1105 | } | 1106 | } |
1106 | } | 1107 | } |
1107 | 1108 | ||
1108 | static void sd_thread(void) __attribute__((noreturn)); | 1109 | static void sd_thread(void) NORETURN_ATTR; |
1109 | static void sd_thread(void) | 1110 | static void sd_thread(void) |
1110 | { | 1111 | { |
1111 | struct queue_event ev; | 1112 | struct queue_event ev; |
diff --git a/firmware/target/arm/imx31/gigabeat-s/system-gigabeat-s.c b/firmware/target/arm/imx31/gigabeat-s/system-gigabeat-s.c index f458561731..e1894ce0ac 100644 --- a/firmware/target/arm/imx31/gigabeat-s/system-gigabeat-s.c +++ b/firmware/target/arm/imx31/gigabeat-s/system-gigabeat-s.c | |||
@@ -21,6 +21,7 @@ | |||
21 | 21 | ||
22 | #include "kernel.h" | 22 | #include "kernel.h" |
23 | #include "system.h" | 23 | #include "system.h" |
24 | #include "gcc_extensions.h" | ||
24 | #include "panic.h" | 25 | #include "panic.h" |
25 | #include "avic-imx31.h" | 26 | #include "avic-imx31.h" |
26 | #include "gpio-imx31.h" | 27 | #include "gpio-imx31.h" |
@@ -219,9 +220,9 @@ void system_prepare_fw_start(void) | |||
219 | 220 | ||
220 | #ifndef BOOTLOADER | 221 | #ifndef BOOTLOADER |
221 | void rolo_restart_firmware(const unsigned char *source, unsigned char *dest, | 222 | void rolo_restart_firmware(const unsigned char *source, unsigned char *dest, |
222 | int length) __attribute__((noreturn)); | 223 | int length) NORETURN_ATTR; |
223 | 224 | ||
224 | void __attribute__((noreturn)) | 225 | void NORETURN_ATTR |
225 | rolo_restart(const unsigned char *source, unsigned char *dest, int length) | 226 | rolo_restart(const unsigned char *source, unsigned char *dest, int length) |
226 | { | 227 | { |
227 | /* Some housekeeping tasks must be performed for a safe changeover */ | 228 | /* Some housekeeping tasks must be performed for a safe changeover */ |
diff --git a/firmware/target/arm/imx31/rolo_restart_firmware.S b/firmware/target/arm/imx31/rolo_restart_firmware.S index 5f24f653e0..45d37d14ef 100644 --- a/firmware/target/arm/imx31/rolo_restart_firmware.S +++ b/firmware/target/arm/imx31/rolo_restart_firmware.S | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | /**************************************************************************** | 26 | /**************************************************************************** |
27 | * void rolo_restart_firmware(const unsigned char* source, unsigned char* dest, | 27 | * void rolo_restart_firmware(const unsigned char* source, unsigned char* dest, |
28 | * int length) __attribute__((noreturn)); | 28 | * int length) NORETURN_ATTR; |
29 | */ | 29 | */ |
30 | .section .text, "ax", %progbits | 30 | .section .text, "ax", %progbits |
31 | .align 2 | 31 | .align 2 |
diff --git a/firmware/target/arm/s3c2440/sd-s3c2440.c b/firmware/target/arm/s3c2440/sd-s3c2440.c index d42405db65..4a15835b67 100644 --- a/firmware/target/arm/s3c2440/sd-s3c2440.c +++ b/firmware/target/arm/s3c2440/sd-s3c2440.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "sd.h" | 24 | #include "sd.h" |
25 | #include "system.h" | 25 | #include "system.h" |
26 | #include <string.h> | 26 | #include <string.h> |
27 | #include "gcc_extensions.h" | ||
27 | #include "thread.h" | 28 | #include "thread.h" |
28 | #include "panic.h" | 29 | #include "panic.h" |
29 | 30 | ||
@@ -575,7 +576,7 @@ bool sd_removable(IF_MD_NONVOID(int card_no)) | |||
575 | #endif /* HAVE_HOTSWAP */ | 576 | #endif /* HAVE_HOTSWAP */ |
576 | /*****************************************************************************/ | 577 | /*****************************************************************************/ |
577 | 578 | ||
578 | static void sd_thread(void) __attribute__((noreturn)); | 579 | static void sd_thread(void) NORETURN_ATTR; |
579 | static void sd_thread(void) | 580 | static void sd_thread(void) |
580 | { | 581 | { |
581 | struct queue_event ev; | 582 | struct queue_event ev; |
diff --git a/firmware/target/arm/system-arm.c b/firmware/target/arm/system-arm.c index 01d2ba6e67..8d07347514 100644 --- a/firmware/target/arm/system-arm.c +++ b/firmware/target/arm/system-arm.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <stdio.h> | 23 | #include <stdio.h> |
24 | #include "lcd.h" | 24 | #include "lcd.h" |
25 | #include "font.h" | 25 | #include "font.h" |
26 | #include "gcc_extensions.h" | ||
26 | 27 | ||
27 | static const char* const uiename[] = { | 28 | static const char* const uiename[] = { |
28 | "Undefined instruction", | 29 | "Undefined instruction", |
@@ -34,7 +35,7 @@ static const char* const uiename[] = { | |||
34 | /* Unexpected Interrupt or Exception handler. Currently only deals with | 35 | /* Unexpected Interrupt or Exception handler. Currently only deals with |
35 | exceptions, but will deal with interrupts later. | 36 | exceptions, but will deal with interrupts later. |
36 | */ | 37 | */ |
37 | void __attribute__((noreturn)) UIE(unsigned int pc, unsigned int num) | 38 | void NORETURN_ATTR UIE(unsigned int pc, unsigned int num) |
38 | { | 39 | { |
39 | #if LCD_DEPTH > 1 | 40 | #if LCD_DEPTH > 1 |
40 | lcd_set_backdrop(NULL); | 41 | lcd_set_backdrop(NULL); |
diff --git a/firmware/target/arm/tcc780x/sd-tcc780x.c b/firmware/target/arm/tcc780x/sd-tcc780x.c index 88ccf187f0..7f17e457c9 100644 --- a/firmware/target/arm/tcc780x/sd-tcc780x.c +++ b/firmware/target/arm/tcc780x/sd-tcc780x.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include "sd.h" | 22 | #include "sd.h" |
23 | #include "system.h" | 23 | #include "system.h" |
24 | #include <string.h> | 24 | #include <string.h> |
25 | #include "gcc_extensions.h" | ||
25 | #include "sdmmc.h" | 26 | #include "sdmmc.h" |
26 | #include "storage.h" | 27 | #include "storage.h" |
27 | #include "led.h" | 28 | #include "led.h" |
@@ -642,7 +643,7 @@ sd_write_error: | |||
642 | } | 643 | } |
643 | } | 644 | } |
644 | 645 | ||
645 | static void sd_thread(void) __attribute__((noreturn)); | 646 | static void sd_thread(void) NORETURN_ATTR; |
646 | static void sd_thread(void) | 647 | static void sd_thread(void) |
647 | { | 648 | { |
648 | struct queue_event ev; | 649 | struct queue_event ev; |
diff --git a/firmware/target/coldfire/system-coldfire.c b/firmware/target/coldfire/system-coldfire.c index ba67daa3a6..75440a23bf 100644 --- a/firmware/target/coldfire/system-coldfire.c +++ b/firmware/target/coldfire/system-coldfire.c | |||
@@ -20,6 +20,7 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | #include <stdio.h> | 21 | #include <stdio.h> |
22 | #include "config.h" | 22 | #include "config.h" |
23 | #include "gcc_extensions.h" | ||
23 | #include "adc.h" | 24 | #include "adc.h" |
24 | #include "system.h" | 25 | #include "system.h" |
25 | #include "lcd.h" | 26 | #include "lcd.h" |
@@ -200,7 +201,7 @@ static void system_display_exception_info(unsigned long format, | |||
200 | reliable. The system restarts, but boot often fails with ata error -42. */ | 201 | reliable. The system restarts, but boot often fails with ata error -42. */ |
201 | } | 202 | } |
202 | 203 | ||
203 | static void UIE(void) __attribute__ ((noreturn)); | 204 | static void UIE(void) NORETURN_ATTR; |
204 | static void UIE(void) | 205 | static void UIE(void) |
205 | { | 206 | { |
206 | asm volatile("subq.l #4,%sp"); /* phony return address - never used */ | 207 | asm volatile("subq.l #4,%sp"); /* phony return address - never used */ |
diff --git a/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c b/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c index 8fdf7d0287..023835303b 100644 --- a/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c | |||
@@ -20,6 +20,7 @@ | |||
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | #include "config.h" | 22 | #include "config.h" |
23 | #include "gcc_extensions.h" | ||
23 | #include "jz4740.h" | 24 | #include "jz4740.h" |
24 | #include "ata.h" | 25 | #include "ata.h" |
25 | #include "ata_idle_notify.h" | 26 | #include "ata_idle_notify.h" |
@@ -47,7 +48,7 @@ static const char sd_thread_name[] = "ata/sd"; | |||
47 | static struct event_queue sd_queue; | 48 | static struct event_queue sd_queue; |
48 | static struct mutex sd_mtx; | 49 | static struct mutex sd_mtx; |
49 | static struct wakeup sd_wakeup; | 50 | static struct wakeup sd_wakeup; |
50 | static void sd_thread(void) __attribute__((noreturn)); | 51 | static void sd_thread(void) NORETURN_ATTR; |
51 | 52 | ||
52 | static int use_4bit; | 53 | static int use_4bit; |
53 | static int num_6; | 54 | static int num_6; |