Select the types of activity you want to include in your feed.
Introduce NORETURN_ATTR wrapper for __attribute__((noreturn)), using this and a bit further cleanup in main gets rid of a warning when compiling for android.
···2020 ****************************************************************************/
2121#include "config.h"
22222323+#include "gcc_extensions.h"
2324#include "storage.h"
2425#include "disk.h"
2526#include "fat.h"
···112113#include "m5636.h"
113114#endif
114115116116+#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
117117+#define MAIN_NORETURN_ATTR NORETURN_ATTR
118118+#else
119119+/* gcc adds an implicit 'return 0;' at the end of main(), causing a warning
120120+ * with noreturn attribute */
121121+#define MAIN_NORETURN_ATTR
122122+#endif
123123+115124#if (CONFIG_PLATFORM & PLATFORM_HOSTED)
116125#include "sim_tasks.h"
117126#endif
118127119119-#ifdef HAVE_SDL
128128+#if (CONFIG_PLATFORM & PLATFORM_SDL)
120129#include "system-sdl.h"
130130+#define HAVE_ARGV_MAIN
131131+/* Don't use SDL_main on windows -> no more stdio redirection */
132132+#if defined(WIN32)
133133+#undef main
134134+#endif
121135#endif
122136123137/*#define AUTOROCK*/ /* define this to check for "autostart.rock" on boot */
124138125139static void init(void);
126126-127127-#ifdef HAVE_SDL
128128-#if defined(WIN32) && defined(main)
129129-/* Don't use SDL_main on windows -> no more stdio redirection */
130130-#undef main
131131-#endif
132132-int main(int argc, char *argv[])
133133-{
134134-#ifdef APPLICATION
135135- paths_init();
136136-#endif
137137- sys_handle_argv(argc, argv);
138138-#else
139140/* main(), and various functions called by main() and init() may be
140141 * be INIT_ATTR. These functions must not be called after the final call
141142 * to root_menu() at the end of main()
142143 * see definition of INIT_ATTR in config.h */
143143-int main(void) INIT_ATTR __attribute__((noreturn));
144144+#ifdef HAVE_ARGV_MAIN
145145+int main(int argc, char *argv[]) INIT_ATTR MAIN_NORETURN_ATTR ;
146146+int main(int argc, char *argv[])
147147+{
148148+ sys_handle_argv(argc, argv);
149149+#else
150150+int main(void) INIT_ATTR MAIN_NORETURN_ATTR;
144151int main(void)
145152{
146153#endif
···328335329336static void init(void)
330337{
338338+#ifdef APPLICATION
339339+ paths_init();
340340+#endif
331341 system_init();
332342 kernel_init();
333343 buffer_init();
···707717}
708718709719#ifdef CPU_PP
710710-void __attribute__((noreturn)) cop_main(void)
720720+void cop_main(void) MAIN_NORETURN_ATTR;
721721+void cop_main(void)
711722{
712723/* This is the entry point for the coprocessor
713724 Anyone not running an upgraded bootloader will never reach this point,
···1818* KIND, either express or implied.
1919*
2020****************************************************************************/
2121-#include "config.h"
2221#ifndef __ROOT_MENU_H__
2322#define __ROOT_MENU_H__
24232525-void root_menu(void) __attribute__((noreturn));
2424+#include "config.h"
2525+#include "gcc_extensions.h"
2626+2727+void root_menu(void) NORETURN_ATTR;
26282729enum {
2830 /* from old menu api, but still required*/
+2-1
bootloader/gigabeat-s.c
···2222#include "system.h"
2323#include <stdio.h>
2424#include "kernel.h"
2525+#include "gcc_extensions.h"
2526#include "string.h"
2627#include "adc.h"
2728#include "powermgmt.h"
···296297}
297298298299/* Try to load the firmware and run it */
299299-static void __attribute__((noreturn)) handle_firmware_load(void)
300300+static void NORETURN_ATTR handle_firmware_load(void)
300301{
301302 int rc = load_firmware(load_buf, BOOTFILE,
302303 load_buf_size);
···2525#include <inttypes.h>
2626#include <stddef.h>
2727#include <stdbool.h>
2828+#include "gcc_extensions.h"
28292930/* Priority scheduling (when enabled with HAVE_PRIORITY_SCHEDULING) works
3031 * by giving high priority threads more CPU time than lower priority threads
···385386/* Wait for a thread to exit */
386387void thread_wait(unsigned int thread_id);
387388/* Exit the current thread */
388388-void thread_exit(void) __attribute__((noreturn));
389389+void thread_exit(void) NORETURN_ATTR;
389390#if defined(DEBUG) || defined(ROCKBOX_HAS_LOGF)
390391#define ALLOW_REMOVE_THREAD
391392/* Remove a thread from the scheduler */