From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: FW: How to avoid compiler warning `unused lexical variable' for `dolist' or `dotimes'? Date: Thu, 7 Jan 2021 16:05:56 +0000 (UTC) Message-ID: <0db0bc9d-7efb-4d3e-8462-545d0a5b25f5@default> References: <87o8i1ou7m.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30295"; mail-complaints-to="usenet@ciao.gmane.io" To: Help Gnu Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jan 07 17:06:31 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 1kxXnz-0007mp-Dl for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 07 Jan 2021 17:06:31 +0100 Original-Received: from localhost ([::1]:60404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxXny-0003Sc-El for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 07 Jan 2021 11:06:30 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxXnY-0003QX-TY for help-gnu-emacs@gnu.org; Thu, 07 Jan 2021 11:06:05 -0500 Original-Received: from userp2130.oracle.com ([156.151.31.86]:43414) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxXnW-0000OU-7j for help-gnu-emacs@gnu.org; Thu, 07 Jan 2021 11:06:04 -0500 Original-Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 107FncxU045544 for ; Thu, 7 Jan 2021 16:05:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : subject : references : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=mYpQbJpBAA4X0vra/i96C/+z6p4QooAYCpGfAFGF10E=; b=iw7k7dXClQtnV9n2P1TWf4/IlbX9PA1gxeVoXy4lgmiCIKrxXy6m5FuboGykgr9IAe9x kFT6UDPknWlqTagUlto+olVJaukV0NWGfQM6pMeRxdHA/mJxQyvrRLieyARrZoJ9pUyo qRPn1tD76BxLKrYJCJvRseytd6HpmEsz7/IVWp8YM+aDnalzJ7R29N7DMlFzxIbKMaco VZW/+4tkwGiKvfT1NgzJsV8QB7piSZywzTXnaknNAT+ISz1xYxrECLCdePQcHRZkTR7G Lb5wbRF5d2o8xRMoVKEPbh3FC9BsBmldExxl5vmGP6MnnWo66c146P9NC2kaviwI7Gz6 ig== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 35wftxcm3y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 07 Jan 2021 16:05:59 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 107FoXNu056677 for ; Thu, 7 Jan 2021 16:05:59 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 35w3qtwavx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 07 Jan 2021 16:05:58 +0000 Original-Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 107G5vvY026399 for ; Thu, 7 Jan 2021 16:05:57 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5095.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9857 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 malwarescore=0 mlxscore=0 spamscore=0 mlxlogscore=970 phishscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101070097 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9857 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 suspectscore=0 mlxscore=0 bulkscore=0 priorityscore=1501 impostorscore=0 clxscore=1015 lowpriorityscore=0 mlxlogscore=979 malwarescore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101070097 Received-SPF: pass client-ip=156.151.31.86; envelope-from=drew.adams@oracle.com; helo=userp2130.oracle.com X-Spam_score_int: -45 X-Spam_score: -4.6 X-Spam_bar: ---- X-Spam_report: (-4.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.246, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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:127057 Archived-At: [Forwarding to the list - forgot to explicitly add it again...] > What about fixing the byte-compiler so it won't warn a > used variable is unused? :) Yes. To which I expect the reply "Patch welcome". ;-) The same inappropriate compiler warning is issued for dotimes and cl-dotimes (the Common Lisp emulation). Emacs Lisp has decided that use of the RETURN arg is "deprecated" - even for the CL emulation, cl-dotimes. The compiler shouldn't issue this warning, IMO. [The bug thread claims Common Lisp's allowing the RETURN arg is a "misfeature".] But is this faulty warning a big deal? No, not really. Elisp byte-compiler warnings can be helpful. But they can also often be noisy and sometimes wrong/misleading. Warning about warnings: Caveat lector.