GNU bug report logs - #21389
bogus diagnostic about unused lexical variable in eshell/time

Previous Next

Package: emacs;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Mon, 31 Aug 2015 21:37:02 UTC

Severity: minor

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Kangas <stefan <at> marxist.se>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#21389: closed (bogus diagnostic about unused lexical variable
 in eshell/time)
Date: Wed, 02 Sep 2020 01:09:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 1 Sep 2020 18:08:24 -0700
with message-id <CADwFkmmpR4zw=FGNXio780+UDRenKWStL0CR_J+a256NoqGaPA <at> mail.gmail.com>
and subject line Re: bug#21389: bogus diagnostic about unused lexical variable in eshell/time
has caused the debbugs.gnu.org bug report #21389,
regarding bogus diagnostic about unused lexical variable in eshell/time
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
21389: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21389
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Emacs bug reports <bug-gnu-emacs <at> gnu.org>
Subject: bogus diagnostic about unused lexical variable in eshell/time
Date: Mon, 31 Aug 2015 14:36:33 -0700
To reproduce the problem in a fresh build from Emacs master, do this:

touch lisp/eshell/em-unix.el
make

The output will include the following lines:

eshell/em-unix.el:933:1:Warning: Unused lexical variable ‘args’
eshell/em-unix.el:963:1:Warning: Unused lexical argument ‘args’

The first diagnostic is bogus.  The second one is correct.  Perhaps the 
byte compiler is getting confused by the second one and the confusion is 
affecting the first one.

The first diagnostic is generated for code that starts off like this:

(defun eshell/time (&rest args)
  "Implementation of \"time\" in Lisp."
  (let ((time-args (copy-alist args))
     ...

so the lexical variable ‘args’ is being used.


[Message part 3 (message/rfc822, inline)]
From: Stefan Kangas <stefan <at> marxist.se>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 21389-done <at> debbugs.gnu.org
Subject: Re: bug#21389: bogus diagnostic about unused lexical variable in
 eshell/time
Date: Tue, 1 Sep 2020 18:08:24 -0700
Paul Eggert <eggert <at> cs.ucla.edu> writes:

> To reproduce the problem in a fresh build from Emacs master, do this:
>
> touch lisp/eshell/em-unix.el
> make
>
> The output will include the following lines:
>
> eshell/em-unix.el:933:1:Warning: Unused lexical variable ‘args’
> eshell/em-unix.el:963:1:Warning: Unused lexical argument ‘args’
>
> The first diagnostic is bogus.  The second one is correct.  Perhaps the byte
> compiler is getting confused by the second one and the confusion is affecting
> the first one.
>
> The first diagnostic is generated for code that starts off like this:
>
> (defun eshell/time (&rest args)
>   "Implementation of \"time\" in Lisp."
>   (let ((time-args (copy-alist args))
>      ...
>
> so the lexical variable ‘args’ is being used.

This seems to have been fixed on current master, so I'm closing this bug
report.


This bug report was last modified 4 years and 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.