all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master 7e294d5: Remove some obsolete integer overflow handling
       [not found] ` <20190722172805.DA95520BE2@vcs0.savannah.gnu.org>
@ 2019-07-22 23:19   ` Pip Cet
  2019-07-23  0:47     ` Paul Eggert
  0 siblings, 1 reply; 3+ messages in thread
From: Pip Cet @ 2019-07-22 23:19 UTC (permalink / raw
  To: emacs-devel, Mattias Engdegård

[-- Attachment #1: Type: text/plain, Size: 1172 bytes --]

On Mon, Jul 22, 2019 at 5:28 PM Mattias Engdegård
<mattiase@savannah.gnu.org> wrote:
> diff --git a/lisp/subr.el b/lisp/subr.el
> index 4a1649f..9fd3366 100644
> --- a/lisp/subr.el
> +++ b/lisp/subr.el
> @@ -681,14 +681,12 @@ of course, also replace TO with a slightly larger value
>      (when (zerop inc) (error "The increment can not be zero"))
>      (let (seq (n 0) (next from) (last from))
>        (if (> inc 0)
> -          ;; The (>= next last) condition protects against integer
> -          ;; overflow in computing NEXT.
> -          (while (and (>= next last) (<= next to))
> +          (while (<= next to)
>              (setq seq (cons next seq)
>                    n (1+ n)
>                    last next
>                    next (+ from (* n inc))))
> -        (while (and (<= next last) (>= next to))
> +        (while (>= next to)
>            (setq seq (cons next seq)
>                  n (1+ n)
>                  next (+ from (* n inc)))))

This causes a warning here:

  ELC      ../lisp/subr.elc

In toplevel form:
subr.el:655:1:Warning: Unused lexical variable ‘last’

which is fixed by the attached patch.

[-- Attachment #2: 0001-Avoid-byte-compiler-warning-for-subr.el.patch --]
[-- Type: application/x-patch, Size: 964 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Emacs-diffs] master 7e294d5: Remove some obsolete integer overflow handling
  2019-07-22 23:19   ` [Emacs-diffs] master 7e294d5: Remove some obsolete integer overflow handling Pip Cet
@ 2019-07-23  0:47     ` Paul Eggert
  2019-07-23  9:03       ` Mattias Engdegård
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Eggert @ 2019-07-23  0:47 UTC (permalink / raw
  To: Pip Cet, emacs-devel, Mattias Engdegård

Thanks, I installed that.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Emacs-diffs] master 7e294d5: Remove some obsolete integer overflow handling
  2019-07-23  0:47     ` Paul Eggert
@ 2019-07-23  9:03       ` Mattias Engdegård
  0 siblings, 0 replies; 3+ messages in thread
From: Mattias Engdegård @ 2019-07-23  9:03 UTC (permalink / raw
  To: Paul Eggert; +Cc: Pip Cet, emacs-devel

23 juli 2019 kl. 01.19 skrev Pip Cet <pipcet@gmail.com>:

> subr.el:655:1:Warning: Unused lexical variable ‘last’
> 
> which is fixed by the attached patch.

23 juli 2019 kl. 02.47 skrev Paul Eggert <eggert@cs.ucla.edu>:

> Thanks, I installed that.

Sorry about that, and thank you both!




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-23  9:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20190722172804.7625.94762@vcs0.savannah.gnu.org>
     [not found] ` <20190722172805.DA95520BE2@vcs0.savannah.gnu.org>
2019-07-22 23:19   ` [Emacs-diffs] master 7e294d5: Remove some obsolete integer overflow handling Pip Cet
2019-07-23  0:47     ` Paul Eggert
2019-07-23  9:03       ` Mattias Engdegård

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.