From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andreas =?UTF-8?Q?R=C3=B6hler?= Newsgroups: gmane.emacs.bugs Subject: bug#33314: 27.0.50; wrong compiler warning Date: Thu, 8 Nov 2018 17:41:07 +0100 Message-ID: References: <20181108155459.99206.qmail@mail.muc.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1541695139 16598 195.159.176.226 (8 Nov 2018 16:38:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Nov 2018 16:38:59 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 Cc: 33314@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 08 17:38:55 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKnKX-0004BT-4K for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Nov 2018 17:38:53 +0100 Original-Received: from localhost ([::1]:57865 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKnMd-0007S6-8z for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Nov 2018 11:41:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKnHz-00031V-9b for bug-gnu-emacs@gnu.org; Thu, 08 Nov 2018 11:36:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKnHu-0007RM-QT for bug-gnu-emacs@gnu.org; Thu, 08 Nov 2018 11:36:15 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37616) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gKnHm-0007Ah-5f for bug-gnu-emacs@gnu.org; Thu, 08 Nov 2018 11:36:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gKnHl-00022v-Vn for bug-gnu-emacs@gnu.org; Thu, 08 Nov 2018 11:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andreas =?UTF-8?Q?R=C3=B6hler?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Nov 2018 16:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33314 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33314-submit@debbugs.gnu.org id=B33314.15416949397836 (code B ref 33314); Thu, 08 Nov 2018 16:36:01 +0000 Original-Received: (at 33314) by debbugs.gnu.org; 8 Nov 2018 16:35:39 +0000 Original-Received: from localhost ([127.0.0.1]:41874 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKnHP-00022K-3n for submit@debbugs.gnu.org; Thu, 08 Nov 2018 11:35:39 -0500 Original-Received: from mout.kundenserver.de ([212.227.17.10]:33405) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gKnHN-000227-LL for 33314@debbugs.gnu.org; Thu, 08 Nov 2018 11:35:38 -0500 Original-Received: from [192.168.178.35] ([88.130.106.226]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N8GEY-1fPeFu2UIi-014BuN; Thu, 08 Nov 2018 17:35:30 +0100 In-Reply-To: <20181108155459.99206.qmail@mail.muc.de> Content-Language: en-US X-Provags-ID: V03:K1:sIouxyXRKyqPclEn6uVu77VrCLQCZzIqx/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ailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:152172 Archived-At: On 08.11.2018 16:54, Alan Mackenzie wrote: > Hello, Andreas. > > In article you wrote: >> Get a compiler Warning: Unused lexical variable ‘regexp’ > >> WRT a form like below: > > Reformatting that to make things clearer: > > (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))) > >> ;; > >> As visible, regexp is evaluated in last clause. > > Does the rest of that let* form use regexpvalue? If not, the lack of > use of regexpvalue will, I believe, transfer to regexp. > > Incidentally, why write (symbol-value 'py-extended-block-or-clause-re) > rather than just py-extended-block-or-clause-re? > Hi Alan, that form is used to make a decision at a certain point: (cond ((and (member regexp (list 'py-block-or-clause-re ... )) (looking-at regexpvalue)) So regexpvalue is used too. May send the complete function if interested.