GNU bug report logs - #39919
26.3; Incorrect byte-compiler warning

Previous Next

Package: emacs;

Reported by: Mike Woolley <mike <at> bulsara.com>

Date: Thu, 5 Mar 2020 00:02:02 UTC

Severity: minor

Merged with 16206, 31232, 41287

Found in versions 24.3, 26.3, 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 39919 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 39919 <at> debbugs.gnu.org, mike <at> bulsara.com
Subject: Re: bug#39919: 26.3; Incorrect byte-compiler warning
Date: Fri, 06 Mar 2020 23:23:02 -0500
[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Hmm, no, actually, there were already two old bug reports about this
  > issue: bug#16206 and 31232.  The RESULT argument of `dotimes' had been
  > deprecated as a result of that discussion.

I can't easily obtain that discussion.  Perhaps that discussion
turned up some other reason to deprecated that argument.  But if it
was solely to avoid these warnings, I am surprised it is hard.

Does this patch fix the problem?

diff -u /home/rms/emacs-git/build-oct-2/lisp/subr.el.\~1\~ /home/rms/emacs-git/build-oct-2/lisp/subr.el
--- /home/rms/emacs-git/build-oct-2/lisp/subr.el.~1~	2019-10-02 11:07:09.046065358 -0400
+++ /home/rms/emacs-git/build-oct-2/lisp/subr.el	2020-03-06 19:31:20.053693281 -0500
@@ -281,7 +281,7 @@
                (setq ,counter (1+ ,counter)))
              ,@(if (cddr spec)
                    ;; FIXME: This let often leads to "unused var" warnings.
-                   `((let ((,(car spec) ,counter)) ,@(cddr spec))))))
+                   `((let ((,(car spec) ,counter)) ,(car spec) ,@(cddr spec))))))
       `(let ((,temp ,end)
              (,(car spec) ,start))
          (while (< ,(car spec) ,temp)

Diff finished.  Fri Mar  6 19:34:23 2020

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)






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

Previous Next


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