[memprof: 7/76] intercept.c: Hint the compiler that our _exit will not return as well



commit fdd8ad08f8e105b22b8b572ee25d130ba7a1cc91
Author: Holger Hans Peter Freyther <zecke selfish org>
Date:   Thu Jun 4 12:58:38 2009 +0200

    intercept.c: Hint the compiler that our _exit will not return as well

 lib/intercept.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/lib/intercept.c b/lib/intercept.c
index 8890028..e9ce91a 100644
--- a/lib/intercept.c
+++ b/lib/intercept.c
@@ -28,6 +28,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <string.h>
+#include <assert.h>
 
 #include "intercept.h"
 #include "memintercept.h"
@@ -559,6 +560,11 @@ _exit (int status)
 	}
 
 	(*old__exit) (status);
+
+	/* Not reached as old__exit will not return but makes
+	 * the compiler happy.
+	 */
+	assert(0);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]