From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 16 02:12:11 2017 Received: (at submit) by debbugs.gnu.org; 16 Aug 2017 06:12:11 +0000 Received: from localhost ([127.0.0.1]:40151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhrYo-0007kR-R6 for submit@debbugs.gnu.org; Wed, 16 Aug 2017 02:12:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhrYn-0007kE-1F for submit@debbugs.gnu.org; Wed, 16 Aug 2017 02:12:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhrYg-00080w-Pj for submit@debbugs.gnu.org; Wed, 16 Aug 2017 02:12:03 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:57362) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dhrYg-00080s-Mp for submit@debbugs.gnu.org; Wed, 16 Aug 2017 02:12:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dhrYf-0004nx-K7 for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2017 02:12:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dhrYa-0007zw-Ik for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2017 02:12:01 -0400 Received: from mail-pg0-x230.google.com ([2607:f8b0:400e:c05::230]:38040) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dhrYa-0007ze-Bl for bug-gnu-emacs@gnu.org; Wed, 16 Aug 2017 02:11:56 -0400 Received: by mail-pg0-x230.google.com with SMTP id l64so18612080pge.5 for ; Tue, 15 Aug 2017 23:11:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=8y5OfQBTsqmUYXQN9xpRal4ZJ+wJVzxsmCbbM90lPj4=; b=UfR8Q70vjiTvr/xvLAyTI+lyhu7XV26ClZMQtpTkWYtYHAAeajU0j08TMI1veJJeg6 RYeoOVyXXq6Q8OC3HGQE+p6fnKOrtksJxxaTJsbUO5GQcqKMSmO++5QFCnRlZThxZiKN lFMyi/1sCEwn5ZXdnkFO732X5y19AIR65GZ1zwGq8naiQ0LRcLzea0KP9UirJrhknndN v4mqg0jd9DbevD/hhCFkothgFIsiIJQLLSK7yndeyYx7m89Vsl7mD0jhq68u7g39BfmC YpfWytHMX/fs1QQcX8ed8WrtCQu+y/3O01DxMhujnaPSMEzXn/A+q9GYZfeSg4ckUVXw DNIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=8y5OfQBTsqmUYXQN9xpRal4ZJ+wJVzxsmCbbM90lPj4=; b=ZhS4uter5Heciq5rPnbbSt3FB8S04p/7KqckA4cO45axKHZ565lLDHijOCEEuzm/4o PHoZc9cupazxUpp5CJ/XNS2IoQooj0aAB/bA6SwGvbagyta1Q9ec7ME/Dg9mOw0yimR0 uTIi111lAJqp7hE4xmjNakAFFQnaN3AFhsT70z/utCpuNmjnUCyntGFINJXGy3KExNt/ s8UHRBbpBo4Q+87sAHJeuEQLO6wCGZKNUK74N6O4UpVqUh0gK+lajSOjU7ZBsdVt7Q0n Rfx9WNGSS9Hlh1oIz7XFfcoC5r4ENzIqKTAsWWbvKc9ea/RbqBzEfAKlnhOHfHo4Jr6K htag== X-Gm-Message-State: AHYfb5jrWav9OOyl2gIRQm9UQUpwv6WnE4vSIEyxOwGMMb3Qqbzi9vR+ 7y23LseN5OJExkYy X-Received: by 10.98.204.136 with SMTP id j8mr587642pfk.275.1502863913695; Tue, 15 Aug 2017 23:11:53 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id a63sm222709pfc.165.2017.08.15.23.11.51 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 Aug 2017 23:11:52 -0700 (PDT) From: Tino Calancha To: bug-gnu-emacs@gnu.org Subject: 26.0.50; Byte compilation shows an unused var warning for an used variable Date: Wed, 16 Aug 2017 15:11:47 +0900 Message-ID: <87d17wyrbw.fsf@calancha-pc> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Write a file '/tmp/test.el' with following content: --8<-----------------------------cut here---------------start------------->8--- ;; -*- lexical-binding: t; -*- ;; Compiles OK (defun test () (let ((lst (list "foo" 1))) (when (cdr lst) (equal (cdr lst) 1)))) ;; Compiles OK (defun getval (x) (cdr x)) (defun test3 () (let ((alist (list (cons "foo" 1) (cons "bar" 2)))) (dolist (x alist) (when (getval x) (equal (getval x) (alist-get (car x) alist)))))) ;; Warning: value returned from (cdr x) is unused (defun test2 () (let ((alist (list (cons "foo" 1) (cons "bar" 2)))) (dolist (x alist) (when (cdr x) (equal (cdr x) (alist-get (car x) alist)))))) --8<-----------------------------cut here---------------end--------------->8--- emacs -Q M-x byte-compile-file /tmp/test.el RET I got a warning from test2 func: Warning: value returned from (cdr x) is unused But the value is used as the `when' condition, and as `equal' 1st argument. In GNU Emacs 26.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-08-16 Repository revision: 3305dec5387021791eb09a93df5ab784b2297dc8 From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 17 12:40:16 2017 Received: (at 28107) by debbugs.gnu.org; 17 Aug 2017 16:40:16 +0000 Received: from localhost ([127.0.0.1]:43008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diNqC-0002go-3Z for submit@debbugs.gnu.org; Thu, 17 Aug 2017 12:40:16 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diNqA-0002gX-MJ for 28107@debbugs.gnu.org; Thu, 17 Aug 2017 12:40:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1diNpz-0004Pa-Nk for 28107@debbugs.gnu.org; Thu, 17 Aug 2017 12:40:09 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1diNpw-0004K7-6V; Thu, 17 Aug 2017 12:40:00 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1diNpu-0003Lg-Dz; Thu, 17 Aug 2017 12:39:58 -0400 From: Glenn Morris To: Tino Calancha Subject: Re: bug#28107: 26.0.50; Byte compilation shows an unused var warning for an used variable References: <87d17wyrbw.fsf@calancha-pc> X-Spook: Gazprom Conficker electronic surveillance unclassified X-Ran: 4FQN|s7/qn{ayI%[ea|YF"%JrJ+lr;M/Dxz$VNq1sW#,:8L&AN@.Xi>LB'_59PjVW_*kf" X-Hue: yellow X-Attribution: GM Date: Thu, 17 Aug 2017 12:39:58 -0400 In-Reply-To: <87d17wyrbw.fsf@calancha-pc> (Tino Calancha's message of "Wed, 16 Aug 2017 15:11:47 +0900") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28107 Cc: 28107@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Tino Calancha wrote: > ;; Warning: value returned from (cdr x) is unused > (defun test2 () > (let ((alist (list (cons "foo" 1) (cons "bar" 2)))) > (dolist (x alist) > (when (cdr x) > (equal (cdr x) (alist-get (car x) alist)))))) Isn't this function a no-op? Eg dolist does not return the last value from the body. So a smaller example of the same thing is: (dolist (x '(1)) (equal (+ x 2) 3)) which returns nil. > ;; Compiles OK > (defun getval (x) (cdr x)) > (defun test3 () > (let ((alist (list (cons "foo" 1) (cons "bar" 2)))) > (dolist (x alist) > (when (getval x) > (equal (getval x) (alist-get (car x) alist)))))) If getcdr is known to be side-effect-free, you get the same warning. (eval-when-compile (put 'getcdr 'side-effect-free t)) So I think this is a (slightly inaccurate) warning of a real issue. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 17 12:45:52 2017 Received: (at 28107) by debbugs.gnu.org; 17 Aug 2017 16:45:52 +0000 Received: from localhost ([127.0.0.1]:43012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diNvb-0002rq-Pp for submit@debbugs.gnu.org; Thu, 17 Aug 2017 12:45:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diNvZ-0002rc-Oq for 28107@debbugs.gnu.org; Thu, 17 Aug 2017 12:45:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1diNvT-0005Lb-Sx for 28107@debbugs.gnu.org; Thu, 17 Aug 2017 12:45:44 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1diNvQ-0005IK-Nd; Thu, 17 Aug 2017 12:45:40 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1diNvQ-0003hz-CH; Thu, 17 Aug 2017 12:45:40 -0400 From: Glenn Morris To: Tino Calancha Subject: Re: bug#28107: 26.0.50; Byte compilation shows an unused var warning for an used variable References: <87d17wyrbw.fsf@calancha-pc> X-Spook: Metro Telex Breach kilo class Dateline TELINT Bomb threat X-Ran: SeLf'C^$WscO.yL<++,?!&/zqQFhW^4X0f<9D>j+&1m-D43H5^K7]y@V-IgPeXv"t-M0+$ X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Thu, 17 Aug 2017 12:45:40 -0400 In-Reply-To: (Glenn Morris's message of "Thu, 17 Aug 2017 12:39:58 -0400") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28107 Cc: 28107@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Glenn Morris wrote: > If getcdr is known to be side-effect-free, you get the same warning. s/getcdr/getval From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 17 13:33:11 2017 Received: (at 28107) by debbugs.gnu.org; 17 Aug 2017 17:33:11 +0000 Received: from localhost ([127.0.0.1]:43059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diOfP-00044U-25 for submit@debbugs.gnu.org; Thu, 17 Aug 2017 13:33:11 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:34299) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diOfN-00044G-3v for 28107@debbugs.gnu.org; Thu, 17 Aug 2017 13:33:09 -0400 Received: by mail-pg0-f67.google.com with SMTP id y192so10893819pgd.1 for <28107@debbugs.gnu.org>; Thu, 17 Aug 2017 10:33:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=mIcLoeHsO0QHM1Wf09Z+CBGbw561TtvNq0TLavJIiW4=; b=YJOiYUHaG6tBIgKffEoPjdMi07joeS8HUzQVfvsC1/RV45ArIcvAPl4kRc64aJafd5 dnqDTc/PJaK1K6SPp6dmmYAO1f/zJglhL19TaETqDUg0TpahQVa5NwaRuPZWseI1RzVB IszXhZEQcjhFclBK3SGJ/tQFwXmNdjDACle1uE/UOfJdtCEQAJs5nGAuyGsdJRSvA9tQ r9ABNXso03vC8ML8OZI0Sxyu7fwtZS4mvG3akj+nVorYlW9wUxH84FzNk2r8MjyajEXX hY30U34Rm4Iol+2q7b4PbLuZOEJdYz2iSswyXBfEnqLfI37E6wnIocNlnGSUnIXlmy3Z cp2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=mIcLoeHsO0QHM1Wf09Z+CBGbw561TtvNq0TLavJIiW4=; b=qjVa+p7SluFkslzg9zaqXkj+hO4YV7y4zsJDgU0bv9wQnw+v10ePrmH6Opjgr24kly lhry9tI+CKeMTlvygJ4w6OCz51yfMc/JMmwzNFth+CIvPS3LMz99kj8WNkU3NouHMQ9+ hEZFu1NP6zRhmKTfaBKfbH9ScusdbBjky6rR/CvLz2tk1ha0ATFOFok/u+CQFhZf7/18 RBEVNqS61l80HjE70KUv+9dsIPu2cH1wn+DJYV8HERHmYYEo2vFebh9GTNh69STBOSog bN6wFsjF6JE/pgMeCfZyk6Dx2jOJkh0+MVgcC8744n9xsBlMpfvhQ0l2ciOO1gAvXiLG ZaHQ== X-Gm-Message-State: AHYfb5gP8mk3RIIyC8ZQ9vwm4yKSzi0JAAcvU9/mys6T+nq3NhmeHSpo stZT5YRbjDUSWQ== X-Received: by 10.84.245.8 with SMTP id i8mr6979394pll.264.1502991182958; Thu, 17 Aug 2017 10:33:02 -0700 (PDT) Received: from calancha-pc (170.224.128.101.dy.bbexcite.jp. [101.128.224.170]) by smtp.gmail.com with ESMTPSA id f80sm8276717pfd.115.2017.08.17.10.33.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Aug 2017 10:33:02 -0700 (PDT) From: Tino Calancha X-Google-Original-From: Tino Calancha Date: Fri, 18 Aug 2017 02:32:59 +0900 (JST) X-X-Sender: calancha@calancha-pc To: Glenn Morris Subject: Re: bug#28107: 26.0.50; Byte compilation shows an unused var warning for an used variable In-Reply-To: Message-ID: References: <87d17wyrbw.fsf@calancha-pc> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: 28107 Cc: 28107@debbugs.gnu.org, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.5 (/) On Thu, 17 Aug 2017, Glenn Morris wrote: > Tino Calancha wrote: > >> ;; Warning: value returned from (cdr x) is unused >> (defun test2 () >> (let ((alist (list (cons "foo" 1) (cons "bar" 2)))) >> (dolist (x alist) >> (when (cdr x) >> (equal (cdr x) (alist-get (car x) alist)))))) > > Isn't this function a no-op? > Eg dolist does not return the last value from the body. > So a smaller example of the same thing is: > > (dolist (x '(1)) > (equal (+ x 2) 3)) > > which returns nil. Even without the dolist we get such warning: $> cat /tmp/test.el ;; -*- lexical-binding: t; -*- (let ((x 1)) (and (equal (+ x 2) 3))) M-x byte-compile-file RET /tmp/test RET Compiling file /tmp/test.el at Fri Aug 18 02:30:59 2017 test.el:2:1:Warning: value returned from (+ x 2) is unused test.el:2:1:Warning: value returned from (+ x 2) is unused I used (+ x 2) as 1st argument for `equal'. What more should i do to use it? Maybe invite (+ x 2) to the cinema? I hope (+ x 2) will pay, cinema it's too expensive here. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 17 21:42:44 2017 Received: (at 28107) by debbugs.gnu.org; 18 Aug 2017 01:42:44 +0000 Received: from localhost ([127.0.0.1]:43341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diWJ9-0001yq-Uv for submit@debbugs.gnu.org; Thu, 17 Aug 2017 21:42:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:47338) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diWJ8-0001yd-3g for 28107@debbugs.gnu.org; Thu, 17 Aug 2017 21:42:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1diWJ2-0006Q2-3T for 28107@debbugs.gnu.org; Thu, 17 Aug 2017 21:42:36 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNRESOLVED_TEMPLATE autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52674) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1diWIy-0006Ot-PN; Thu, 17 Aug 2017 21:42:32 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1diWIy-0002HY-D4; Thu, 17 Aug 2017 21:42:32 -0400 From: Glenn Morris To: Tino Calancha Subject: Re: bug#28107: 26.0.50; Byte compilation shows an unused var warning for an used variable References: <87d17wyrbw.fsf@calancha-pc> X-Spook: New Federation bomb Peking assassinate Iraq Suspicious X-Ran: .#RiI (Tino Calancha's message of "Fri, 18 Aug 2017 02:32:59 +0900 (JST)") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: 28107 Cc: 28107@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) Tino Calancha wrote: > ;; -*- lexical-binding: t; -*- > (let ((x 1)) > (and (equal (+ x 2) 3))) This code also does nothing. Compare with: (defun foo () (let ((x 1)) (and (equal (+ x 2) 3)))) where the result is used (as the function return) and there is no warning. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 12 11:03:53 2019 Received: (at 28107) by debbugs.gnu.org; 12 Jun 2019 15:03:53 +0000 Received: from localhost ([127.0.0.1]:33852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hb4n2-00069d-NP for submit@debbugs.gnu.org; Wed, 12 Jun 2019 11:03:52 -0400 Received: from quimby.gnus.org ([80.91.231.51]:55148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hb4mz-00069U-Ik for 28107@debbugs.gnu.org; Wed, 12 Jun 2019 11:03:49 -0400 Received: from cm-84.212.204.8.getinternet.no ([84.212.204.8] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hb4mw-00070O-BD; Wed, 12 Jun 2019 17:03:48 +0200 From: Lars Ingebrigtsen To: Glenn Morris Subject: Re: bug#28107: 26.0.50; Byte compilation shows an unused var warning for an used variable References: <87d17wyrbw.fsf@calancha-pc> Date: Wed, 12 Jun 2019 17:03:45 +0200 In-Reply-To: (Glenn Morris's message of "Thu, 17 Aug 2017 21:42:32 -0400") Message-ID: <87muimvoa6.fsf@mouse.gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Glenn Morris writes: > Tino Calancha wrote: > >> ;; -*- lexical-binding: t; -*- >> (let ((x 1)) >> (and (equal (+ x 2) 3))) > > This code also does nothing. Compare with: > > (defun foo () > (let ((x 1)) > (and (equal (+ [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 28107 Cc: 28107@debbugs.gnu.org, Tino Calancha X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Glenn Morris writes: > Tino Calancha wrote: > >> ;; -*- lexical-binding: t; -*- >> (let ((x 1)) >> (and (equal (+ x 2) 3))) > > This code also does nothing. Compare with: > > (defun foo () > (let ((x 1)) > (and (equal (+ x 2) 3)))) > > where the result is used (as the function return) and there is no warning. So I don't think there's a bug here, and I'm closing this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 12 11:03:56 2019 Received: (at control) by debbugs.gnu.org; 12 Jun 2019 15:03:56 +0000 Received: from localhost ([127.0.0.1]:33855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hb4n6-00069z-1E for submit@debbugs.gnu.org; Wed, 12 Jun 2019 11:03:56 -0400 Received: from quimby.gnus.org ([80.91.231.51]:55164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hb4n3-00069m-Rw for control@debbugs.gnu.org; Wed, 12 Jun 2019 11:03:54 -0400 Received: from cm-84.212.204.8.getinternet.no ([84.212.204.8] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hb4n1-00070W-99 for control@debbugs.gnu.org; Wed, 12 Jun 2019 17:03:53 +0200 Date: Wed, 12 Jun 2019 17:03:50 +0200 Message-Id: <87lfy6voa1.fsf@mouse.gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #28107 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 28107 notabug close 28107 Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 28107 notabug close 28107 From unknown Tue Jun 24 22:39:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 11 Jul 2019 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator