summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2010-03-30 10:18:29 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2010-03-30 14:15:03 +0200
commite723f79cb7d35b56bc8b5bcb16a5818ec3e20ef0 (patch)
treeec1902c9bb12d60d6b8fda0fe896458fb5154278
parente11c07c33994383052f041dd5551b80bee4fb6f3 (diff)
downloadbarebox-e723f79cb7d35b56bc8b5bcb16a5818ec3e20ef0.tar.gz
barebox-e723f79cb7d35b56bc8b5bcb16a5818ec3e20ef0.tar.xz
make panic and hang __noreturn functions
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--common/startup.c2
-rw-r--r--include/common.h4
-rw-r--r--lib/vsprintf.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/common/startup.c b/common/startup.c
index 6dca2702..c7d0cf0d 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -161,7 +161,7 @@ void start_barebox (void)
/* NOTREACHED - no way out of command loop except booting */
}
-void hang (void)
+void __noreturn hang (void)
{
puts ("### ERROR ### Please RESET the board ###\n");
for (;;);
diff --git a/include/common.h b/include/common.h
index 3b3d2de8..fb1400c6 100644
--- a/include/common.h
+++ b/include/common.h
@@ -65,8 +65,8 @@ typedef void (interrupt_handler_t)(void *);
*/
void reginfo(void);
-void hang (void) __attribute__ ((noreturn));
-void panic(const char *fmt, ...);
+void __noreturn hang (void);
+void __noreturn panic(const char *fmt, ...);
/* */
long int initdram (int);
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 26fcaa76..91ad613c 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -593,7 +593,7 @@ char *asprintf(const char *fmt, ...)
}
EXPORT_SYMBOL(asprintf);
-void panic(const char *fmt, ...)
+void __noreturn panic(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);