From: Philipp Stephani <p.stephani2@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 41287@debbugs.gnu.org
Subject: bug#41287: 28.0.50; Spurious warning "Unused lexical"
Date: Fri, 15 May 2020 16:07:55 +0200 [thread overview]
Message-ID: <CAArVCkQQvcNK+B=z8wQDs5Bkvt_CMEQbZhcd69dyMWwt3i++dA@mail.gmail.com> (raw)
In-Reply-To: <87h7whia8q.fsf@gmx.de>
Am Fr., 15. Mai 2020 um 15:45 Uhr schrieb Michael Albinus
<michael.albinus@gmx.de>:
>
>
> I have the following defun in tramp.el (my local repo)
>
> --8<---------------cut here---------------start------------->8---
> (defun tramp-get-signal-strings ()
> "Strings to return by `process-file' in case of signals."
> ;; We use key nil for local connection properties.
> (with-tramp-connection-property nil "signal-strings"
> (let (result)
> (if (and (stringp shell-file-name) (executable-find shell-file-name))
> (dotimes (i 128 (reverse result))
> (push
> (if (= i 19) 1 ;; SIGSTOP
> (call-process
> shell-file-name nil nil nil "-c" (format "kill -%d $$" i)))
> result))
> (dotimes (i 128 (reverse result))
> (push (format "Signal %d" i) result))))))
> --8<---------------cut here---------------end--------------->8---
>
> Compiling this, I get
>
> --8<---------------cut here---------------start------------->8---
> tramp.el:5065:1: Warning: Unused lexical variable ‘i’
> tramp.el:5065:1: Warning: Unused lexical variable ‘i’
> --8<---------------cut here---------------end--------------->8---
>
> `i' is used in both `dotimes' loops. What does the compiler tell me?
This is probably the same as Bug#39919. tl;dr: remove the result
argument from the dotimes form.
next prev parent reply other threads:[~2020-05-15 14:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-15 13:44 bug#41287: 28.0.50; Spurious warning "Unused lexical" Michael Albinus
2020-05-15 14:07 ` Philipp Stephani [this message]
2020-05-15 14:25 ` Michael Albinus
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAArVCkQQvcNK+B=z8wQDs5Bkvt_CMEQbZhcd69dyMWwt3i++dA@mail.gmail.com' \
--to=p.stephani2@gmail.com \
--cc=41287@debbugs.gnu.org \
--cc=michael.albinus@gmx.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.