From db926d809113fbb185dfc9e400bdf3216a687762 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Tue, 11 Apr 2006 07:13:33 +0000 Subject: [PATCH] * 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. --- src/ChangeLog | 7 +++++++ src/data.c | 7 +++++++ src/lisp.h | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index bd557cd0b16..936b14089b4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2006-04-11 Dan Nicolaescu + + * 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 * s/ms-w32.h (pid_t) [_MSC_VER]: New typedef. diff --git a/src/data.c b/src/data.c index 73f712279d7..8b8015bb002 100644 --- a/src/data.c +++ b/src/data.c @@ -125,7 +125,14 @@ wrong_type_argument (predicate, value) 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 diff --git a/src/lisp.h b/src/lisp.h index 5d1b3266a0d..9748eebfcb5 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2246,7 +2246,7 @@ extern unsigned long cons_to_long P_ ((Lisp_Object)); 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)); -- 2.39.2