From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.devel Subject: Re: false warnings when compiling with lexical-binding and cl-lib. Date: Fri, 22 Nov 2013 08:48:50 +0100 Organization: Emacs Helm Message-ID: <87siuo6fml.fsf@gmail.com> References: <8761rl6ael.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1385106553 7326 80.91.229.3 (22 Nov 2013 07:49:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 22 Nov 2013 07:49:13 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 22 08:49:18 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VjlUM-0001vs-Cy for ged-emacs-devel@m.gmane.org; Fri, 22 Nov 2013 08:49:18 +0100 Original-Received: from localhost ([::1]:37363 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjlUM-0006Bm-2x for ged-emacs-devel@m.gmane.org; Fri, 22 Nov 2013 02:49:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjlUE-0006BO-NC for emacs-devel@gnu.org; Fri, 22 Nov 2013 02:49:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjlU9-0003R3-Ca for emacs-devel@gnu.org; Fri, 22 Nov 2013 02:49:10 -0500 Original-Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]:59535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjlU9-0003Qo-5P for emacs-devel@gnu.org; Fri, 22 Nov 2013 02:49:05 -0500 Original-Received: by mail-wg0-f45.google.com with SMTP id a1so780016wgh.0 for ; Thu, 21 Nov 2013 23:49:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:organization:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=hQOeJovMw3n5LAR9Ie5uJDkv7z0bLhswK0WwRp/qmC0=; b=i6Us2J5UGQ+t2HRkWu+6NVdjo6kWwQMF2XYPv/oqMYqkQ63wBTBuVtZILr+/KHEcyH 92NOGsuC92j3Qh7trtZ1iksl0gxXQ0pMy/WwZSL/tc0fepdkGtWLu8anMy60SusJJCBr Ol1WrgnF3juGT/M4gRA6nkLw1XmFgLsQEituoomh332mDKZ3s8IDXuMw7Svs+KULuZbr tJ1YTaxCYnVU5saKQBam01HukzYS+15QUF1f7JDgFmN0+xOI9p4gFulEBQ9Bery0Iv9b PQVXamzHBY3Dxk0vGikCAFgQOCXXoI1ngB+AZTWFIEkFlnNI7BPKfCfXHZCpVIBHcpW+ eJxA== X-Received: by 10.180.39.212 with SMTP id r20mr1400201wik.13.1385106544020; Thu, 21 Nov 2013 23:49:04 -0800 (PST) Original-Received: from dell-14z ([37.162.130.16]) by mx.google.com with ESMTPSA id y20sm13351690wib.0.2013.11.21.23.49.00 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 21 Nov 2013 23:49:03 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Thu, 21 Nov 2013 20:19:43 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c00::22d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:165542 Archived-At: Stefan Monnier writes: >> here a sample file containing a function using loop: > >> --8<---------------cut here---------------start------------->8--- >> ;;; test.el --- test loop -*- lexical-binding: t -*- > >> (require 'cl-lib) > >> (defun test-with (l) >> (cl-loop with lst >> for i in l >> unless (member i lst) >> collect i into lst >> finally return lst)) >> --8<---------------cut here---------------end--------------->8--- > >> When compiling this file I have a warning about unused arg `lst'. >> Is this wanted ? > > No, it's not wanted. But noone so far as been able to come up with > a patch to fix it (the code to fix is the cl-loop macro: look at the > macro-expanded code to see the unused `lst'). Ok I see: ,---- | (let* ((lst nil) (--cl-var-- l) (i nil) (lst nil)) `---- -- Thierry Get my Gnupg key: gpg --keyserver pgp.mit.edu --recv-keys 59F29997