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: Michael Albinus <michael.albinus <at> gmx.de>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: 25017 <at> debbugs.gnu.org
Subject: bug#25017: Fwd: Re: dotimes var comiler warning
Date: Thu, 24 Nov 2016 15:44:04 +0100
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:

>> (dotimes (i erg)
>>
>>    ...do-something
>>
>> Compiler sends a warning "Unused lexical variable ‘i’ - whilst seems
>> no way to leave out such a var.
>
> 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.

Why is this a problem? We have the same situation with function
arguments. If you have an unused argument, you do the same:

(defun my-fun (_unused used)
  ;; code w/o _unused
  )

> Michael.

Best regards, Michael.




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.