[PATCH master 3/3] barebox.h: annotate __hang as __noreturn

Ahmad Fatoum a.fatoum at pengutronix.de
Fri Apr 4 08:55:21 PDT 2025


Otherwise, GCC may complain that other __noreturn functions calling
__hang can in fact return.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 include/barebox.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/barebox.h b/include/barebox.h
index 334dcfceffcf..02228451c26e 100644
--- a/include/barebox.h
+++ b/include/barebox.h
@@ -6,7 +6,7 @@
 #include <linux/compiler.h>
 
 /* For use when unrelocated */
-static inline void __hang(void)
+static inline __noreturn void __hang(void)
 {
 	while (1);
 }
-- 
2.39.5




More information about the barebox mailing list