From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Philipp Stephani
Newsgroups: gmane.emacs.help
Subject: Re: How to avoid compiler warning `unused lexical variable' for
`dolist' or `dotimes'?
Date: Thu, 7 Jan 2021 11:07:14 +0100
Message-ID:
References:
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
logging-data="19621"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: Help GNU Emacs
To: Jean Louis
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 07 11:08:12 2021
Return-path:
Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92)
(envelope-from )
id 1kxSDD-00050h-TF
for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 07 Jan 2021 11:08:11 +0100
Original-Received: from localhost ([::1]:58260 helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1kxSDC-0003r1-UX
for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 07 Jan 2021 05:08:10 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36432)
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1kxSCe-0003qS-QW
for help-gnu-emacs@gnu.org; Thu, 07 Jan 2021 05:07:36 -0500
Original-Received: from mail-ot1-x332.google.com ([2607:f8b0:4864:20::332]:46926)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from )
id 1kxSCV-0007bL-KG
for help-gnu-emacs@gnu.org; Thu, 07 Jan 2021 05:07:34 -0500
Original-Received: by mail-ot1-x332.google.com with SMTP id w3so5739049otp.13
for ; Thu, 07 Jan 2021 02:07:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc:content-transfer-encoding;
bh=+CXCem47i3jTUI5hZAbu98gkiPMWpjETCtt9GcEPM1M=;
b=MV83uoDyYNXW3pDasU9D3grNPkbm6kgq5/f8t3+qzsvpnEujzJhHRIp1dsG1859pSl
M1Bol9x6gqMwuQAAEaU3+EJFnkiKyyEIMLTLo4zQ4W5ySrucfK2MsIfg5L/PE+ywSzQN
T6WO7WT5pyw9EwOT13dm4vWhMvUWd2xYWZAizOB3D9D5V7mrTeZtLwFbpnpBPdtwjxfm
kkXeTn2ZW5Otz5rtPBfDWA58E6GKnnN0Q921TeM7ZBp9Shd2LPgs1gnyuggoufA4OzfW
ZQfs1rBoQWCa/Fka5KqLyqM2R7b0erkv7gnPXQpCNAMmO6b/gjSoQuxDCurGLw7plyLh
xn9w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc:content-transfer-encoding;
bh=+CXCem47i3jTUI5hZAbu98gkiPMWpjETCtt9GcEPM1M=;
b=tKxdvEi99YlqbkjxhEQq4a/v4mUSfvlzZiBVwXF+ifpYUgyqbNm2lgW9LFtpB/g5k7
YpZaJDfu1EZpfVMxApu8shvIRqwBQAjk401FTRPKZWntDnm/W9HkKq5745QMxEAoyulo
9hJp23gOJXUbjJlCNfQlZ9r8f3RmYgEbXQjyYD6w/jV7qyuqXQEv4zkCc6r53JxMtDFK
+gDjet3Ks+4d+2T+ZJwuUMSjQ+esNPXKA8nEfzVxiRCluJpdlAWJctarRVxnluf6Gjxh
RSoO8wWoVK+tgmQ16/KCXH6COl5S+5q2Er+zreD5u3imD2YbG4VHzITgN1z43o2QP2WB
wTsw==
X-Gm-Message-State: AOAM531m0W49ZkrUeOCwOPIUL/l+JXEc0rIx45auiC7V8rNZ9uObwLM5
K4Nvv8UUZ5FUkGoTuKW+GsuRzXOudiVpYZkLn1E=
X-Google-Smtp-Source: ABdhPJxD1gIypISPrZOIsL3UKOV22w+rwqNVEL3jsyuDfVVdVyMfjAi+x60JKj51c1ACyKFFDYnbrJGSUG0t5+B4u6E=
X-Received: by 2002:a9d:269:: with SMTP id 96mr6020424otb.174.1610014045300;
Thu, 07 Jan 2021 02:07:25 -0800 (PST)
In-Reply-To:
Received-SPF: pass client-ip=2607:f8b0:4864:20::332;
envelope-from=p.stephani2@gmail.com; helo=mail-ot1-x332.google.com
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001,
RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1.23
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-mx.org@gnu.org
Original-Sender: "help-gnu-emacs"
Xref: news.gmane.io gmane.emacs.help:127040
Archived-At:
Am Do., 7. Jan. 2021 um 08:59 Uhr schrieb Jean Louis :
>
> (defun db/table-id-plist (table id pg)
> "Returns plist for table by its table_id"
> (let* ((columns (db/table-columns table pg))
> (sql (db/sql-by-columns table columns id))
> (values (rcd-sql-first sql pg))
> (values (append values nil))
> (length (length columns))
> (plist '()))
> (dotimes (i length plist)
> (setf plist (plist-put plist (intern (elt columns i)) (elt values i=
))))))
>
>
> What is proper way to avoid this warning in `dolist' or `dotimes':
>
> rcd-db.el:841:1: Warning: Unused lexical variable =E2=80=98i=E2=80=99
This is https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D16206. tl;dr:
don't use the three-argument form of `dotimes':
(dotimes (i length) ; no `plist' here
...)
plist