[haiku-development] Patch for the "'noreturn' function returns" warning on call to assert(0)

  • From: Dhruwat Bhagat <unitedronaldo@xxxxxxxxx>
  • To: haiku mailing list <haiku-development@xxxxxxxxxxxxx>
  • Date: Sun, 15 May 2011 06:45:50 -0700 (PDT)



----- Forwarded Message -----
From: Dhruwat Bhagat <unitedronaldo@xxxxxxxxx>
To: "haiku@xxxxxxxxxxxxx" <haiku@xxxxxxxxxxxxx>
Sent: Thursday, May 12, 2011 12:45 AM
Subject: 


I am submitting a patch for the "'noreturn' function returns" warning on call 
to assert(0). 
Index: assert.h
===================================================================
--- assert.h    (revision 41440)
+++ assert.h    (working copy)
@@ -16,10 +16,12 @@
 #endif
 
 extern void __assert_fail(const char *assertion, const char *file,
-                               unsigned int line, const char *function);
+                               unsigned int line, const char *function)
+       __attribute__ ((noreturn));
 
 extern void __assert_perror_fail(int error, const char *file,
-                               unsigned int line, const char *function);
+                               unsigned int line, const char *function)
+       __atribute__ ((noreturn));
 
 #ifdef __cplusplus
 }

Other related posts: