From: Paul Eggert Date: Sat, 1 Feb 2025 22:09:06 +0000 (-0800) Subject: Omit 2 ‘volatile’s in internal_lisp_condition_case X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0a5d5c81aa180672e66a364c3a8157c9e6fb910c;p=emacs.git Omit 2 ‘volatile’s in internal_lisp_condition_case * 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) --- diff --git a/src/eval.c b/src/eval.c index f83633c52c8..8cf07de20d1 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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++;