emacs-diffs
[Top][All Lists]
Advanced

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

master c4e66bb2b5: Fix compiler warning due to a recent change


From: Eli Zaretskii
Subject: master c4e66bb2b5: Fix compiler warning due to a recent change
Date: Sat, 29 Jan 2022 02:13:31 -0500 (EST)

branch: master
commit c4e66bb2b567f9dced364013a84ba415dd55290d
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix compiler warning due to a recent change
    
    * src/data.c (Ffset): Avoid compiler warning about 'function'.
---
 src/data.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/data.c b/src/data.c
index 039e6c3113..a5a76a2755 100644
--- a/src/data.c
+++ b/src/data.c
@@ -836,7 +836,6 @@ DEFUN ("fset", Ffset, Sfset, 2, 2, 0,
        doc: /* Set SYMBOL's function definition to DEFINITION, and return 
DEFINITION.  */)
   (register Lisp_Object symbol, Lisp_Object definition)
 {
-  register Lisp_Object function;
   CHECK_SYMBOL (symbol);
   /* Perhaps not quite the right error signal, but seems good enough.  */
   if (NILP (symbol) && !NILP (definition))
@@ -844,11 +843,11 @@ DEFUN ("fset", Ffset, Sfset, 2, 2, 0,
        think this one little sanity check is worth its cost, but anyway.  */
     xsignal1 (Qsetting_constant, symbol);
 
-  function = XSYMBOL (symbol)->u.s.function;
-
   eassert (valid_lisp_object_p (definition));
 
 #ifdef HAVE_NATIVE_COMP
+  register Lisp_Object function = XSYMBOL (symbol)->u.s.function;
+
   if (comp_enable_subr_trampolines
       && SUBRP (function)
       && !SUBR_NATIVE_COMPILEDP (function))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]