changeset 69928:56d8e0539545

* lisp.h (wrong_type_argument): Mark as NO_RETURN. * data.c (wrong_type_argument): Try to avoid compiler warnings due to the fact the function is now marked as NO_RETURN.
author Dan Nicolaescu <dann@ics.uci.edu>
date Tue, 11 Apr 2006 07:13:33 +0000
parents d7865de7cf68
children beebc22085fe
files src/ChangeLog src/data.c src/lisp.h
diffstat 3 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Apr 11 01:28:04 2006 +0000
+++ b/src/ChangeLog	Tue Apr 11 07:13:33 2006 +0000
@@ -1,3 +1,10 @@
+2006-04-11  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* lisp.h (wrong_type_argument): Mark as NO_RETURN.
+
+	* data.c (wrong_type_argument): Try to avoid compiler warnings due
+	to the fact the function is now marked as NO_RETURN.
+
 2006-04-10  Eli Zaretskii  <eliz@gnu.org>
 
 	* s/ms-w32.h (pid_t) [_MSC_VER]: New typedef.
--- a/src/data.c	Tue Apr 11 01:28:04 2006 +0000
+++ b/src/data.c	Tue Apr 11 07:13:33 2006 +0000
@@ -125,7 +125,14 @@
       tem = call1 (predicate, value);
     }
   while (NILP (tem));
+  /* This function is marked as NO_RETURN, gcc would warn if it has a
+     return statement or if falls off the function.  Other compilers
+     warn if no return statement is present.  */
+#ifndef __GNUC__
   return value;
+#else
+  abort ();
+#endif
 }
 
 void
--- a/src/lisp.h	Tue Apr 11 01:28:04 2006 +0000
+++ b/src/lisp.h	Tue Apr 11 07:13:33 2006 +0000
@@ -2246,7 +2246,7 @@
 extern void args_out_of_range P_ ((Lisp_Object, Lisp_Object)) NO_RETURN;
 extern void args_out_of_range_3 P_ ((Lisp_Object, Lisp_Object,
 				     Lisp_Object)) NO_RETURN;
-extern Lisp_Object wrong_type_argument P_ ((Lisp_Object, Lisp_Object));
+extern Lisp_Object wrong_type_argument P_ ((Lisp_Object, Lisp_Object)) NO_RETURN;
 extern void store_symval_forwarding P_ ((Lisp_Object, Lisp_Object,
 					 Lisp_Object, struct buffer *));
 extern Lisp_Object do_symval_forwarding P_ ((Lisp_Object));