Subject: bug#16206: closed (Re: bug#16206: 24.3; Incorrect unused variable byte-compiler warning in dotimes)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 28 Apr 2018 20:22:02 +0000

Your bug report

#16206: 24.3; Incorrect unused variable byte-compiler warning in dotimes

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
16206: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16206
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#16206: 24.3; Incorrect unused variable byte-compiler warning in dotimes
From: Juri Linkov <[email-masked]>
To: Stefan Monnier <[email-masked]>
Cc: Christopher Wellons <[email-masked]>, [email-masked]
Date: Sat, 28 Apr 2018 23:21:05 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Version: 27.0.50

>> But without that addition the sentence makes no sense when
>> the documentation describes the RESULT argument and then
>> at the end says that "RESULT should not be used".
>
> "Its use is deprecated".

Done in f4eeb0f.

Subject: 24.3; Incorrect unused variable byte-compiler warning in dotimes
From: Christopher Wellons <[email-masked]>
To: [email-masked]
Date: Fri, 20 Dec 2013 16:06:38 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

When `lexical-binding' is t the byte-compiler issues an invalid warning
for `dotimes' when the optional "result" form is used. For example,
byte-compile a file with these contents.

    ;;; -*- lexical-binding: t; -*-
    (defun foo ()
      (dotimes (i 1 t) i))

Or evaluate this form.

    (let ((lexical-binding t))
      (byte-compile (lambda () (dotimes (i 1 t) i))))

Output:

    Warning: Unused lexical variable `i'

If the t is removed the warning goes away.