GNU bug report logs - #25017
Fwd: Re: dotimes var comiler warning

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>

Date: Thu, 24 Nov 2016 14:02:02 UTC

Severity: wishlist

Done: Michael Heerdegen <michael_heerdegen <at> web.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: npostavs <at> users.sourceforge.net
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 25017 <at> debbugs.gnu.org
Subject: bug#25017: Fwd: Re: dotimes var comiler warning
Date: Thu, 24 Nov 2016 09:23:27 -0500
severity 25017 wishlist
quit

>
>  Subject:   Re: dotimes var comiler warning  
>  Date:   Thu, 24 Nov 2016 14:32:44 +0100  
>  From:   Michael Heerdegen <michael_heerdegen <at> web.de>  
>  To:   Andreas Röhler <andreas.roehler <at> easy-emacs.de>  
>  CC:   Help Gnu Emacs mailing list <help-gnu-emacs <at> gnu.org>  
>
> Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
>
>> when employing a form
>>
>> (dotimes (i erg)
>>
>>    ...do-something
>>
>>
>> Compiler sends a warning "Unused lexical variable ‘i’ - whilst seems
>> no way to leave out such a var.

So you want to do:

    (dotimes (erg)
       ...)

Or perhaps even

    (dotimes erg
       ...)

>>
>> Worth a bug-report?
>
> If none exists yet, I'm for it.  FWIW, there is a FIXME comment in the
> source code already.

The FIXME comment is unrelated to this, as far as I can tell (it's
talking about binding the variable around the optional RESULT
expression).

>
> Yes, you can probably use `_' to suppress the warning, but I always
> wondered why something called like this requires a variable to be
> specified (mandatorily) at all.

Because it's a bit nonstandard to make the *first* arg &optional?




This bug report was last modified 8 years and 170 days ago.

Previous Next


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