From: Mike Frysinger Date: Wed, 29 Jun 2011 11:58:04 +0000 (+0000) Subject: panic: add noreturn attribute X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d2e8b911c0a0661d395ccac72156040702ac842d;p=project%2Fbcm63xx%2Fu-boot.git panic: add noreturn attribute Since panic() never returns, we should add an appropriate attribute to let gcc improve optimization around it. Signed-off-by: Mike Frysinger --- diff --git a/include/common.h b/include/common.h index 3113580bf8..6061643873 100644 --- a/include/common.h +++ b/include/common.h @@ -653,7 +653,7 @@ int strict_strtoul(const char *cp, unsigned int base, unsigned long *res); unsigned long long simple_strtoull(const char *cp,char **endp,unsigned int base); long simple_strtol(const char *cp,char **endp,unsigned int base); void panic(const char *fmt, ...) - __attribute__ ((format (__printf__, 1, 2))); + __attribute__ ((format (__printf__, 1, 2), noreturn)); int sprintf(char * buf, const char *fmt, ...) __attribute__ ((format (__printf__, 2, 3))); int vsprintf(char *buf, const char *fmt, va_list args);