diff src/search.c @ 2268:61855263cb07

[xemacs-hg @ 2004-09-14 14:32:29 by james] Identify functions that don't return, including some DEFUNs.
author james
date Tue, 14 Sep 2004 14:33:07 +0000
parents 4af49f9a7a5c
children 04bc9d2f42c7
line wrap: on
line diff
--- a/src/search.c	Tue Sep 14 02:53:16 2004 +0000
+++ b/src/search.c	Tue Sep 14 14:33:07 2004 +0000
@@ -137,8 +137,10 @@
 			       int RE, Lisp_Object trt,
 			       Lisp_Object inverse_trt, int posix);
 
-static void
-matcher_overflow (void)
+static DECLARE_DOESNT_RETURN (matcher_overflow (void));
+
+static DOESNT_RETURN
+matcher_overflow ()
 {
   stack_overflow ("Stack overflow in regexp matcher", Qunbound);
 }
@@ -243,12 +245,13 @@
 /* Error condition used for failing searches */
 Lisp_Object Qsearch_failed;
 
-static Lisp_Object
+static DECLARE_DOESNT_RETURN (signal_failure (Lisp_Object));
+
+static DOESNT_RETURN
 signal_failure (Lisp_Object arg)
 {
   for (;;)
     Fsignal (Qsearch_failed, list1 (arg));
-  return Qnil; /* Not reached. */
 }
 
 /* Convert the search registers from Bytebpos's to Charbpos's.  Needs to be
@@ -1159,7 +1162,10 @@
   if (np <= 0)
     {
       if (NILP (noerror))
-	return signal_failure (string);
+	{
+	  signal_failure (string);
+	  RETURN_NOT_REACHED (Qnil);
+	}
       if (!EQ (noerror, Qt))
 	{
 	  if (lim < BUF_BEGV (buf) || lim > BUF_ZV (buf))