]> git.eshelyaron.com Git - emacs.git/commitdiff
Omit 2 ‘volatile’s in internal_lisp_condition_case
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 1 Feb 2025 22:09:06 +0000 (14:09 -0800)
committerEshel Yaron <me@eshelyaron.com>
Mon, 3 Feb 2025 11:15:07 +0000 (12:15 +0100)
* src/eval.c (internal_lisp_condition_case): Omit an unnecessary
‘volatile’ and an unnecessary pointer-to-volatile local var.
Perhaps these were needed in previous versions of Emacs, or to
pacify older versions of GCC when using --enable-gcc-warnings,
but they are not needed to pacify current GCC.

(cherry picked from commit c91c591f0f0cc774647c32bdcf05bb3a9551e340)

src/eval.c

index f83633c52c80de315c1cd59d363c56b10e838459..8cf07de20d190c8d4bc4a73ca0ac79231313a21a 100644 (file)
@@ -1478,7 +1478,7 @@ Lisp_Object
 internal_lisp_condition_case (Lisp_Object var, Lisp_Object bodyform,
                              Lisp_Object handlers)
 {
-  struct handler *volatile oldhandlerlist = handlerlist;
+  struct handler *oldhandlerlist = handlerlist;
 
   /* The number of non-success handlers, plus 1 for a sentinel.  */
   ptrdiff_t clausenb = 1;
@@ -1543,12 +1543,11 @@ internal_lisp_condition_case (Lisp_Object var, Lisp_Object bodyform,
       if (!CONSP (condition))
        condition = list1 (condition);
       struct handler *c = push_handler (condition, CONDITION_CASE);
-      Lisp_Object volatile *clauses_volatile = clauses;
       if (sys_setjmp (c->jmp))
        {
          var = var_volatile;
          val = handlerlist->val;
-         Lisp_Object volatile *chosen_clause = clauses_volatile;
+         Lisp_Object volatile *chosen_clause = clauses;
          struct handler *oldh = oldhandlerlist;
          for (struct handler *h = handlerlist->next; h != oldh; h = h->next)
            chosen_clause++;