From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.help Subject: Re: Compiler warning Date: Wed, 18 Jul 2018 07:48:26 -0400 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1531914443 7184 195.159.176.226 (18 Jul 2018 11:47:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2018 11:47:23 +0000 (UTC) Cc: Help Gnu Emacs mailing list To: =?UTF-8?Q?Andreas_R=C3=B6hler?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 18 13:47:19 2018 Return-path: Envelope-to: geh-help-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 1ffkvO-0001ko-JN for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Jul 2018 13:47:18 +0200 Original-Received: from localhost ([::1]:36023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffkxV-0002j8-FS for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Jul 2018 07:49:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffkwW-0002TZ-Bx for help-gnu-emacs@gnu.org; Wed, 18 Jul 2018 07:48:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ffkwV-0004eN-JV for help-gnu-emacs@gnu.org; Wed, 18 Jul 2018 07:48:28 -0400 Original-Received: from mail-oi0-x229.google.com ([2607:f8b0:4003:c06::229]:35147) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ffkwV-0004eH-Dx for help-gnu-emacs@gnu.org; Wed, 18 Jul 2018 07:48:27 -0400 Original-Received: by mail-oi0-x229.google.com with SMTP id i12-v6so8204838oik.2 for ; Wed, 18 Jul 2018 04:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=IuaXTnZ2PBmWivFSzYwXIznOC0qajDBVSVc2E6wiq/I=; b=WFg/DdpfLAJmZGMHUzy+VwFGEzL/f339kbuyB/NuaCPQQj9LozQR8l1snJZCxR6cUn S/UzFXABr0jxoohopu9zkyxWKr+JUbiQlapXVHAuCxUwhBG2wgSs8kfVG+2m7b7SvlMR va+4jKQEoyl5cQsRNwdcKLGLC64ryCq6+CSU4CUo/v/Lb5eQPCnRZ4+bdSmzkoVWS51M MO8xJVuLIakQqnAqiNG1IgY7r59t/APtBYt4jhFzZpNqmfDP+FSP+clTWTd03ulJ2TPh G15zCo+ZBR0upHzpPP6lfeepjqDXu+td6yW/tELi8DvD81XpAmKQv1VVlQH/Kal664Sa h10A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=IuaXTnZ2PBmWivFSzYwXIznOC0qajDBVSVc2E6wiq/I=; b=DHjFB1/F0TrMIX7zQuFJXL+y9BhYLzLBN47Z9jJevbt+ARwqTnkqyAQ/ZK7S7LNUQq WiOyp+KOGzAxEKoTnDXKNhqz26dsSxs7uf309ZR6UQN9QGdbBws3/NYt/SV1Bhi2wgn9 Od203715hgr4vl3Z56HQLbnjz/j4+fwbzjLXsjTzrH33i4p1k/JyXTnQ9IK/U//asCyZ Gsn20vlPWnXC6USlZLw9tk0SAFz/4Orqz9UiVwCtiksFJrkdIjTmgI+rsf6KwH/p06h3 +yuA32Lr+GimSmrMzvckyJEQ3jFP+nC9WVBDAx6A/4ySwuVh8/pqnweVRKtUcr1gzrPK R2cQ== X-Gm-Message-State: AOUpUlFIHHd+T0MNSIWvXeKo7HFHATBqCw6J8/zJT30NE/6nbJUAd2Eg ktR6Yr3RBQkRn5+nkGPG0DsWi8V47EOW1mrHkgA= X-Google-Smtp-Source: AAOMgpc0pAptSCf+K8K4V2z/hK4Oq5UuYCZN9Wnd/sZMKYDYIONqy6oYceQpHPsasYTAN+QknLVlw+4Ebk5Q76sz7rc= X-Received: by 2002:aca:bec2:: with SMTP id o185-v6mr6385993oif.22.1531914506604; Wed, 18 Jul 2018 04:48:26 -0700 (PDT) Original-Received: by 2002:a4a:3b8d:0:0:0:0:0 with HTTP; Wed, 18 Jul 2018 04:48:26 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::229 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:117481 Archived-At: On 18 July 2018 at 07:38, Andreas R=C3=B6hler wrote: > get a strange > > Warning: Unused lexical variable =E2=80=98i=E2=80=99 > > refering to this: > > (defun py-forward-block (&optional arg decorator bol) > "[...]" > (interactive "p") > (let (erg) > (dotimes (i (or arg 1)) > (let ((orig (point))) > (setq erg (py--end-base 'py-block-re orig decorator bol)))) You haven't use `i', so the warning seems fitting. Use `_' instead of `i' to tell the compiler the variable is ignored on purpose. > While code below compiles without warning: > > (defun foo (&optional arg) > (interactive "p") > (dotimes (i (or arg 1)) > (insert "Me again\n"))) Did you compile this one without lexical-binding?