From: Noam Postavsky <npostavs@gmail.com>
To: "Andreas Röhler" <andreas.roehler@online.de>
Cc: Alan Mackenzie <acm@muc.de>, 33314@debbugs.gnu.org
Subject: bug#33314: 27.0.50; wrong compiler warning
Date: Thu, 08 Nov 2018 20:11:17 -0500 [thread overview]
Message-ID: <87wopngimi.fsf@gmail.com> (raw)
In-Reply-To: <ed14c104-0db9-4cd6-8f78-2a3a1496c1b3@online.de> ("Andreas \=\?utf-8\?Q\?R\=C3\=B6hler\=22's\?\= message of "Thu, 8 Nov 2018 17:41:07 +0100")
tags 33314 unreproducible moreinfo
quit
Andreas Röhler <andreas.roehler@online.de> writes:
> So regexpvalue is used too. May send the complete function if interested.
Please do, I can't reproduce the warning you claimed in your original
report (and frankly, I think you've been doing this long enough that you
should know by now that such an abbreviated report is not very helpful).
Trying to fill in your example like this:
;;; -*- lexical-binding: t -*-
(defun foo (regexp &optional something)
"..."
(unless (bobp)
(when (empty-line-p) (skip-chars-backward " \t\r\n\f"))
(let* ((orig (point))
(regexpvalue (if (eq regexp 'py-clause-re)
(symbol-value
'py-extended-block-or-clause-re)
(symbol-value regexp))))
t)))
gives
bug-33314-bcomp-warning.el:3:1:Warning: Unused lexical variable ‘regexpvalue’
bug-33314-bcomp-warning.el:3:1:Warning: Unused lexical variable ‘orig’
bug-33314-bcomp-warning.el:3:1:Warning: Unused lexical argument ‘something’
In end of data:
bug-33314-bcomp-warning.el:13:1:Warning: the function ‘empty-line-p’ is not
known to be defined.
`regexp' is not mentioned, but the other unused variables are, as
expected.
next prev parent reply other threads:[~2018-11-09 1:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-08 14:38 bug#33314: 27.0.50; wrong compiler warning Andreas Röhler
[not found] ` <mailman.3649.1541688141.1284.bug-gnu-emacs@gnu.org>
2018-11-08 15:54 ` Alan Mackenzie
2018-11-08 16:41 ` Andreas Röhler
2018-11-09 1:11 ` Noam Postavsky [this message]
2018-11-09 8:35 ` Andreas Röhler
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=87wopngimi.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=33314@debbugs.gnu.org \
--cc=acm@muc.de \
--cc=andreas.roehler@online.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.