diff mbox

[U-Boot] panic: remove warning "'noreturn' function does return"

Message ID 1311749757-20962-1-git-send-email-hs@denx.de
State Accepted
Commit 40e018815dcf6692eeddffaeba38751b4e8c6af7
Headers show

Commit Message

Heiko Schocher July 27, 2011, 6:55 a.m. UTC
since commit

commit d2e8b911c0a0661d395ccac72156040702ac842d
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Wed Jun 29 11:58:04 2011 +0000

    panic: add noreturn attribute

I see the following warnings:

vsprintf.c: In function 'panic':
vsprintf.c:730: warning: 'noreturn' function does return

for nearly all boards. This patch fixes this warning.

Signed-off-by: Heiko Schocher <hs@denx.de>
cc: Mike Frysinger <vapier@gentoo.org>
---
 lib/vsprintf.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Wolfgang Denk July 28, 2011, 8:54 p.m. UTC | #1
Dear Heiko Schocher,

In message <1311749757-20962-1-git-send-email-hs@denx.de> you wrote:
> since commit
> 
> commit d2e8b911c0a0661d395ccac72156040702ac842d
> Author: Mike Frysinger <vapier@gentoo.org>
> Date:   Wed Jun 29 11:58:04 2011 +0000
> 
>     panic: add noreturn attribute
> 
> I see the following warnings:
> 
> vsprintf.c: In function 'panic':
> vsprintf.c:730: warning: 'noreturn' function does return
> 
> for nearly all boards. This patch fixes this warning.
> 
> Signed-off-by: Heiko Schocher <hs@denx.de>
> cc: Mike Frysinger <vapier@gentoo.org>
> ---
>  lib/vsprintf.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 3b924ec..c029fbb 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -727,4 +727,6 @@  void panic(const char *fmt, ...)
 	udelay (100000);	/* allow messages to go out */
 	do_reset (NULL, 0, 0, NULL);
 #endif
+	while (1)
+		;
 }