unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: npostavs@users.sourceforge.net
To: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
Cc: Michael Heerdegen <michael_heerdegen@web.de>, 25017@debbugs.gnu.org
Subject: bug#25017: Fwd: Re: dotimes var comiler warning
Date: Thu, 24 Nov 2016 09:23:27 -0500	[thread overview]
Message-ID: <87a8cpj6sg.fsf@users.sourceforge.net> (raw)
In-Reply-To: <266831cc-e199-35b0-9564-327c192b2ea6@easy-emacs.de> ("Andreas \=\?utf-8\?Q\?R\=C3\=B6hler\=22's\?\= message of "Thu, 24 Nov 2016 15:10:02 +0100")

severity 25017 wishlist
quit

>
>  Subject:   Re: dotimes var comiler warning  
>  Date:   Thu, 24 Nov 2016 14:32:44 +0100  
>  From:   Michael Heerdegen <michael_heerdegen@web.de>  
>  To:   Andreas Röhler <andreas.roehler@easy-emacs.de>  
>  CC:   Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>  
>
> Andreas Röhler <andreas.roehler@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?





  reply	other threads:[~2016-11-24 14:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <878ts957gj.fsf@web.de>
2016-11-24 14:10 ` bug#25017: Fwd: Re: dotimes var comiler warning Andreas Röhler
2016-11-24 14:23   ` npostavs [this message]
2016-11-24 14:35     ` Michael Heerdegen
2016-11-24 14:44   ` Michael Albinus
2016-11-24 16:50     ` Michael Heerdegen
2016-11-24 17:01       ` Michael Heerdegen
2016-11-25  6:03         ` Drew Adams
2016-11-27 10:20           ` Michael Heerdegen
2016-11-27 18:23             ` Drew Adams
2016-11-27 20:11               ` Philipp Stephani
2016-11-28 16:31                 ` Michael Heerdegen
2016-11-28 16:54                   ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a8cpj6sg.fsf@users.sourceforge.net \
    --to=npostavs@users.sourceforge.net \
    --cc=25017@debbugs.gnu.org \
    --cc=andreas.roehler@easy-emacs.de \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).